/build/static/layout/Breadcrumb_cap_w.png

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

0 Comments   [ + ] Show comments

Answers (2)

Posted by: anonymous_9363 14 years ago
Red Belt
0
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! :)
Posted by: sabelotodo 14 years ago
Senior Yellow Belt
0
Thanx, I will give it a try[;)]

S
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ