cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
jedimaster_mark
Level 7

Execute file on uninstall

I seem to be having an issue accomplishing something in one of my projects. I am working on an installer for an integration. The developer provided me with a configuration tool that gets run when the installation is complete to configure the software. This piece works just fine. The problem I have is when I uninstall.

I am being told that I should have the installer run this program again on uninstallation to ensure that the piece is un-configured and that settings are removed so that we don't hose the software we're integrating with. I tried writing the install location to a registry key, and then using app search to read it back and on uninstall, execute the file before we remove it. This didn't work in the least (in fact, it threw a fatal install error). I've since tried a couple other variations, as well as played around with the sequencing. I'm stumped, nothing seems to work.

Oh yeah, the file requires one or two others to be present, so I can't just run it from the binary table, or I would. Has anyone encountered this? What would you recommend I do? If necessary, I could push back on the developer to make me an uninstall app that can run stand-alone, but I'd prefer not to resort to that.

Thanks in advance for your time.
Labels (1)
0 Kudos
(3) Replies
RobertDickau
Flexera Alumni

What were the action settings when it caused an error? What was the error? You should be able to launch an installed file during uninstall...
0 Kudos
jedimaster_mark
Level 7

Well, I don't recall exactly what the error it threw was, as I've since reverted the project so that QA has something to use for testing. That said, I tried it as both immediate and deferred action. I also placed it towards the beginning and the end of the sequence. I conditionalized it to run when the feature was removed only, i.e. &featurename=2

I sequenced it in InstallExec. I don't know is that is correct. I believe I also tried to sequence it within the UI sequence, but that had no effect either. My gut feeling is that there was something fundamentally wrong with how I set it up, simply because when I logged the uninstall, it didn't get far at all before bombing out completely. As near as I can tell, the registry value containing the path to the executable file that I was trying to read via AppSearch wasn't ever getting populated.

If this information is not sufficient for you, I can recreate the scenario, and grab both the error message and the log.

Thanks,
Mark
0 Kudos
RobertDickau
Flexera Alumni

In general, placing your action in the Execute sequence between before RemoveFiles (and after InstallInitialize, since you'll want to schedule it for deferred mode) should do it. Does an MSI log file show anything about empty properties or the like?
0 Kudos