
simon.tengler1.5524914816967434E12 asked a question.
execute custum action only on uninstall
I have to launch a exe with parameter -s when the pachage installs and with parameter -u when i'm uninstalling the msi.
i made to custom action but i don't know which condition number to set. the -s condion works but the -u gives me a error because the exe is already deleted.
i hope i could explain the problem, because my english is not better...
thanx a lot
- what kind of project is it?
- what do you need to accomplish with the custom action?
- when do you sequence it?
i would like to delete the printer when i uninstall my pachage. to do this i have to launch the install.exe with the parameter -u and i don't know when i have to launch the custom action
- one that you call during Install (set condition NOT Installed) with the -s parameter before "After InstallFinalize"
- one that you call during Uninstall (set condition REMOVE="ALL") with the -u parameter anywhere between "After InstallValidate" and "After RemoveFiles"
There are a few ways to Install a virtual printer through scripts - just google for it. If you still want to use your "install exe" method I would recommend using the "Stored in Binary table" custom action type. In this way you don't have to install the "install exe" file with your MSI.
i attach two scrennshots, maybe they can help to understand...
also your custom action types are wrong - they should both be "Path referencing a directory"
I strongly recommend doing some more learning on Custom Actions. Even the build-in help is good.
it works perfectly!
Robert Dickau has a very good way of explaining things...
best of luck.
thanks again