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" />
paket add PowerShellWixExtension --version 3.0.4
#r "nuget: PowerShellWixExtension, 3.0.4"
// Install PowerShellWixExtension as a Cake Addin #addin nuget:?package=PowerShellWixExtension&version=3.0.4 // Install PowerShellWixExtension as a Cake Tool #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 (1)
Showing the top 1 popular GitHub repositories that depend on PowerShellWixExtension:
Repository | Stars |
---|---|
tableau/TabMon
A Tableau Server performance monitoring service
|
Version | Downloads | Last updated |
---|---|---|
4.0.0-beta.12 | 511 | 4/5/2021 |
3.0.6 | 2,614 | 4/25/2024 |
3.0.4 | 113 | 4/25/2024 |
3.0.2 | 117 | 4/25/2024 |
2.0.1 | 41,084 | 4/4/2017 |
2.0.0-beta2 | 896 | 5/16/2016 |
2.0.0-beta1 | 823 | 5/15/2016 |
1.9.0 | 26,666 | 8/26/2014 |
1.8.0 | 1,520 | 8/18/2014 |
1.7.0 | 1,176 | 7/18/2014 |
1.6.0 | 1,138 | 7/17/2014 |
1.5.0 | 1,281 | 6/23/2014 |
1.4.0 | 1,180 | 6/6/2014 |
1.3.0 | 1,166 | 6/5/2014 |
1.2.0 | 1,209 | 5/29/2014 |
1.1.0 | 1,196 | 5/28/2014 |
## What’s Changed
* Add README to nuspec (#56) @flcdrg