help running script after/during uninstall using Wise For Windows
i can get a custom action working during the install using:
If NOT install then
Execute Program From Destination [SourceDir]install.cmd Default Directory Windows\System32 [install]
End
But when i try to get a script to run right after the uninstall, it wont work. here is what i have that doesnt work.
If REMOVE then
Execute Program From Destination [SourceDir]uninstall.cmd Default Directory Windows\System32 [uninstall]
End
i have both running in "execute immediate" right before "RemoveExistingProducts"
Any ideas? im pretty new to the whole custom action thing, any help will be very much appreciated. thanks!
If NOT install then
Execute Program From Destination [SourceDir]install.cmd Default Directory Windows\System32 [install]
End
But when i try to get a script to run right after the uninstall, it wont work. here is what i have that doesnt work.
If REMOVE then
Execute Program From Destination [SourceDir]uninstall.cmd Default Directory Windows\System32 [uninstall]
End
i have both running in "execute immediate" right before "RemoveExistingProducts"
Any ideas? im pretty new to the whole custom action thing, any help will be very much appreciated. thanks!
0 Comments
[ + ] Show comments
Answers (3)
Please log in to answer
Posted by:
aogilmor
19 years ago
Posted by:
budanker
19 years ago
thanks for the help!
I was able to get things working in part from your reply. What I ended up doing was putting the scripts as part of the installation, then calling them in a specified order.
just after installInitialize in "Execute Immediate" i put:
If REMOVE~="ALL" then
Open uninstall.cmd(action1)
End
and just after InstallFinalize i put:
If REMOVE<>"ALL" then
Open install.cmd(action2)
End
I also tried using the conditions "Install or NOT Install", but those didnt seem to work for me. Anyway, i've got it working this way which is better than nothing. Thanks again!
I was able to get things working in part from your reply. What I ended up doing was putting the scripts as part of the installation, then calling them in a specified order.
just after installInitialize in "Execute Immediate" i put:
If REMOVE~="ALL" then
Open uninstall.cmd(action1)
End
and just after InstallFinalize i put:
If REMOVE<>"ALL" then
Open install.cmd(action2)
End
I also tried using the conditions "Install or NOT Install", but those didnt seem to work for me. Anyway, i've got it working this way which is better than nothing. Thanks again!
Posted by:
aogilmor
19 years ago
Glad it worked for you.
"Install" and "NOT Install" are not valid conditions, as you found out!
"Installed" is actually a Windows Installer condition, not a verb - which means what it looks like - the application has been completely (successfully) installed. That's why you run your install.cmd only if NOT Installed. The condition Installed for the application becomes true after the InstallFinalize completes successfully.
"Install" and "NOT Install" are not valid conditions, as you found out!
"Installed" is actually a Windows Installer condition, not a verb - which means what it looks like - the application has been completely (successfully) installed. That's why you run your install.cmd only if NOT Installed. The condition Installed for the application becomes true after the InstallFinalize completes successfully.
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
so that the conversation will remain readable.