https://github.com/flcdrg/powershellwixextension
Wix Extension for running PowerShell
https://github.com/flcdrg/powershellwixextension
c-sharp powershell wix wix-extension
Last synced: 4 months ago
JSON representation
Wix Extension for running PowerShell
- Host: GitHub
- URL: https://github.com/flcdrg/powershellwixextension
- Owner: flcdrg
- License: other
- Created: 2014-05-25T10:29:22.000Z (about 11 years ago)
- Default Branch: main
- Last Pushed: 2024-04-25T08:11:58.000Z (about 1 year ago)
- Last Synced: 2024-05-01T19:47:33.829Z (about 1 year ago)
- Topics: c-sharp, powershell, wix, wix-extension
- Language: C#
- Size: 1.71 MB
- Stars: 28
- Watchers: 5
- Forks: 12
- Open Issues: 8
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# PowerShellWixExtension
A Wix Extension for running PowerShell scripts
## NuGet Package
[](https://www.nuget.org/packages/PowerShellWixExtension/) [](https://ci.appveyor.com/project/DavidGardiner/powershellwixextension)
All ready to add to an existing Wix project. Grab the latest version from https://www.nuget.org/packages/PowerShellWixExtension/
## Getting Started
1. Add a reference to the PowerShellWixExtension.dll in your Wix Setup Project (NuGet package recommended)
2. Add namespace to .wxs file```xml
```4. To execute a .ps1 file that ships with the project
```xml
```5. To execute inline script use
```xml
```## Notes
### Custom sequences
You can customise when a set of scripts are run by adding your own `` element inside your `` element. eg.
```xml
NOT Installed
```The four defined actions are:
1. `PowerShellScriptsDeferred`
2. `PowerShellScriptsElevatedDeferred`
3. `PowerShellFilesDeferred`
4. `PowerShellFilesElevatedDeferred`### Inline Scripts
* Be aware that if your inline script uses square brackets \[ \], you'll need to escape them like [\\[] [\\]] otherwise they will be interpreted as MSI properties (unless that is what you wanted!)