
erwin.haid1.552491751720083E12 asked a question.
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?
You can add new component for these files, then set the property Uninstall to No.
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;