This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- Re: Installscript: conditionally uninstall component
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Oct 16, 2012
05:21 AM
Installscript: conditionally uninstall component
During uninstall, i have to check for a condition with installscript code.
If this condition is true, i still have to uninstall the application, but i want to keep the files of one specific component.
I didn't find a way to set the "Uninstall" property of this component to "False" with Installscript code.
Do i have to delete the files with Installscript code or is there a better way?
If this condition is true, i still have to uninstall the application, but i want to keep the files of one specific component.
I didn't find a way to set the "Uninstall" property of this component to "False" with Installscript code.
Do i have to delete the files with Installscript code or is there a better way?
(2) Replies
Not applicable
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Oct 16, 2012
08:41 PM
If you want keep some files of one specific component.
You can add new component for these files, then set the property Uninstall to No.
You can add new component for these files, then set the property Uninstall to No.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Oct 17, 2012
05:00 AM
Kevin.Wan wrote:
If you want keep some files of one specific component.
You can add new component for these files, then set the property Uninstall to No.
Thanks for your answer.
But I'd like to set this property "Uninstall" to False during runtime with Installscript code.
Right now i set "Uninstall" to False and delete all files/folders manually with Installscript code, something like this:
function Feature_Uninstalled()
STRING svFileName;
begin
if FindFile(MY_STATUS_FILE, "*.stat", svFileName) < 0 then
// didn't find status file -> delete files
DeleteFile(...);
DeleteFile(...);
...
DeleteDir(...);
endif;
end;