Created
April 14, 2019 13:40
-
-
Save spikensbror/6318adae46f4bb9490315cab5c7680d5 to your computer and use it in GitHub Desktop.
Hack to get MakeSfxCA.exe packaging of WiX custom actions to work for long paths.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- Run the MakeSfxCA.exe CA packaging tool. --> | |
<!--<Exec Command='"$(MakeSfxCA)" "@(IntermediateCAPackage)" "$(SfxCADll)" "@(IntermediateCAAssembly)" "$(CustomActionContents)"' WorkingDirectory="$(ProjectDir)" />--> | |
<PropertyGroup> | |
<PowerShellTempFileName>$([System.IO.Path]::GetTempPath())$([System.Guid]::NewGuid()).ps1</PowerShellTempFileName> | |
<PowerShellContent>& "$(MakeSfxCA)" "@(IntermediateCAPackage)" "$(SfxCADll)" "@(IntermediateCAAssembly)" "$([System.String]::Join(";", $(CustomActionContents)))"</PowerShellContent> | |
</PropertyGroup> | |
<WriteLinesToFile File="$(PowerShellTempFileName)" Lines="$(PowerShellContent)" Overwrite="true" Encoding="Unicode" /> | |
<Exec Command='powershell -command "Set-ExecutionPolicy -Scope CurrentUser RemoteSigned"' /> | |
<Exec Command='powershell -command "Unblock-File -Path {$(PowerShellTempFileName)}"' /> | |
<Exec Command='powershell -command "& \"$(PowerShellTempFileName)\""' WorkingDirectory="$(ProjectDir)" /> | |
<Delete Files="$(PowerShellTempFileName)" /> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment