PowerShellWixExtension 3.0.4
See the version list below for details.
Requires NuGet 2.7 or higher.
dotnet add package PowerShellWixExtension --version 3.0.4
NuGet\Install-Package PowerShellWixExtension -Version 3.0.4
<PackageReference Include="PowerShellWixExtension" Version="3.0.4" />
<PackageVersion Include="PowerShellWixExtension" Version="3.0.4" />
<PackageReference Include="PowerShellWixExtension" />
paket add PowerShellWixExtension --version 3.0.4
#r "nuget: PowerShellWixExtension, 3.0.4"
#addin nuget:?package=PowerShellWixExtension&version=3.0.4
#tool nuget:?package=PowerShellWixExtension&version=3.0.4
PowerShellWixExtension
A Wix Extension for running PowerShell scripts
NuGet Package
All ready to add to an existing Wix project. Grab the latest version from https://www.nuget.org/packages/PowerShellWixExtension/
Getting Started
- Add a reference to the PowerShellWixExtension.dll in your Wix Setup Project (NuGet package recommended)
- Add namespace to .wxs file
<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi" xmlns:powershell="http://schemas.gardiner.net.au/PowerShellWixExtensionSchema">
- To execute a .ps1 file that ships with the project
<powershell:File Id="PSFile1" File="[#TestPs1]" Arguments=""First Argument" 2"/>
- To execute inline script use
<powershell:Script Id="Script2">
<![CDATA[
# Write-Host "Number 2";
for ($i = 1; $i -le 100; $i++)
{
Write-Progress -Activity "Activity" -Status "Status $i% complete" -CurrentOperation "Operation $i" -PercentComplete $i
Start-Sleep -Milliseconds 5
}
]]>
</powershell:Script>
Notes
Custom sequences
You can customise when a set of scripts are run by adding your own <Custom />
element inside your <InstallExecuteSequence />
element. eg.
<InstallExecuteSequence>
<Custom Action="PowerShellScriptsDeferred" After="RegisterUser">NOT Installed</Custom>
</InstallExecuteSequence>
The four defined actions are:
PowerShellScriptsDeferred
PowerShellScriptsElevatedDeferred
PowerShellFilesDeferred
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!)
Learn more about Target Frameworks and .NET Standard.
This package has no dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last Updated |
---|---|---|
4.0.0-beta.12 | 648 | 4/5/2021 |
3.0.6 | 5,179 | 4/25/2024 |
3.0.4 | 132 | 4/25/2024 |
3.0.2 | 133 | 4/25/2024 |
2.0.1 | 43,946 | 4/4/2017 |
2.0.0-beta2 | 1,075 | 5/16/2016 |
2.0.0-beta1 | 1,004 | 5/15/2016 |
1.9.0 | 27,138 | 8/26/2014 |
1.8.0 | 1,874 | 8/18/2014 |
1.7.0 | 1,365 | 7/18/2014 |
1.6.0 | 1,326 | 7/17/2014 |
1.5.0 | 1,471 | 6/23/2014 |
1.4.0 | 1,373 | 6/6/2014 |
1.3.0 | 1,361 | 6/5/2014 |
1.2.0 | 1,401 | 5/29/2014 |
1.1.0 | 1,392 | 5/28/2014 |
## What’s Changed
* Add README to nuspec (#56) @flcdrg