PowerShellWixExtension icon indicating copy to clipboard operation
PowerShellWixExtension copied to clipboard

Help running a script before InstallFile

Open ekr-adb opened this issue 8 years ago • 3 comments

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

ekr-adb avatar May 05 '17 15:05 ekr-adb

I'm not sure. Is it possible to share the verbose log from your installer (link to a Gist if you like)

David

flcdrg avatar May 06 '17 12:05 flcdrg

Thank you for the reply. Here 's the log: https://gist.github.com/ekr-adb/8eabe3d4a5bbc23266fff119700f9172

Alberto

ekr-adb avatar May 08 '17 07:05 ekr-adb

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

ekr-adb avatar May 08 '17 16:05 ekr-adb