PowerShellWixExtension
PowerShellWixExtension copied to clipboard
Help running a script before InstallFile
I wrote a ps script to locate a very old version of our product that use the upgrade id in wrong way, and cannot be automatically removed via msi installation upgrade.
I need to run that script before any other operation, or at least before InstallFiles.
What I tried:
<InstallExecuteSequence>
<Custom Action="PowerShellScriptsDeferred" Before="InstallFiles">NOT Installed</Custom>
<RemoveExistingProducts Before="InstallInitialize" />
</InstallExecuteSequence>
<powershell:Script Id="Uninstall_2.5.7" Elevated="yes">
<![CDATA[
...
my script
...
]]>
</powershell:Script>
But I get the script running after all files have been installed.
How can I do that? Is it possible?
Thank you. Alberto
I'm not sure. Is it possible to share the verbose log from your installer (link to a Gist if you like)
David
Thank you for the reply. Here 's the log: https://gist.github.com/ekr-adb/8eabe3d4a5bbc23266fff119700f9172
Alberto
I tried again changing Elevated property to "no", and I also added a second script, here's the new log: https://gist.github.com/ekr-adb/09a9ed83e385d61e03f241a4fc6dc34b Now, analizing the log, it seems that the scripts are starting in the right moment, but no product were removed from add/remove list. I tried these scripts via Powershell and they works right.
Any help will be appreciated. Alberto