Legacy Setup, delete files on uninstall
Hi
I'm creating a silent installation for a installshield legacy setup. I have created my response (setup.iss) files with the command setup.exe -r etc...
Everything installs and uninstalls perfectley. But after uninstall there are several files and folders in the installation directory.
What I would like to do is to delete all the files and folders only if the uninstall was succssfully.
If I run setup.exe -s -f1"PATHTOISSFILE" -f2"PATHTOLOGFILE", I will have a LOG file that contains the "ResultCode=0" if the uninstall was successfull. I'm doing my installation and uninstallations in an batch script (bat), Is it a way to check for this ResultCode and then delete/remove files and folders?
If anyone have an example script it would be most appreciated.
Regards
S
I'm creating a silent installation for a installshield legacy setup. I have created my response (setup.iss) files with the command setup.exe -r etc...
Everything installs and uninstalls perfectley. But after uninstall there are several files and folders in the installation directory.
What I would like to do is to delete all the files and folders only if the uninstall was succssfully.
If I run setup.exe -s -f1"PATHTOISSFILE" -f2"PATHTOLOGFILE", I will have a LOG file that contains the "ResultCode=0" if the uninstall was successfull. I'm doing my installation and uninstallations in an batch script (bat), Is it a way to check for this ResultCode and then delete/remove files and folders?
If anyone have an example script it would be most appreciated.
Regards
S
0 Comments
[ + ] Show comments
Answers (2)
Please log in to answer
Posted by:
anonymous_9363
14 years ago
Does the set-up stub return ERRORLEVEL to DOS? Try a test for ERRORLEVEL=0 with a branch to a label in your batch file and display a message both there and immediately after the test. The latter is obviously to cater for non-zero ERRORLEVEL. You'll need to trigger a failure in order to test both scenarios.
Myself, I'd forget batch (so 70s...) and build a properly-capable script in VBS or PowerShell. That way, you could parse the actual file for its content. And no, I don't have an example! :)
Myself, I'd forget batch (so 70s...) and build a properly-capable script in VBS or PowerShell. That way, you could parse the actual file for its content. And no, I don't have an example! :)
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.