Our installation package extracts files from a zip archive onto the target machine. If I choose all 6 of the main components to install, then re-run the installer in maintenance mode, then choose two components to remove it removes the shortcuts and other information as expected. However, it does not remove the folder and files placed by the zip extraction.
I have the working code in the uninstall section. Also, I see the maintenance area where the code would go. I am not clear on how to determine which component needs to be removed/added in maintenance mode. I assume it is related to the component selection state, correct?
Thanks.
Remove Files/Folders in Maintenance
-
- Site Admin
- Posts: 5361
- Joined: Sun Aug 22, 2010 4:28 am
Re: Remove Files/Folders in Maintenance
Dear Mark,
how your extracted files are effectively installed on the target machine?
Probably, you didn't use any "Install command" with them and consequently, the same may be not part of the "effective installation process".
Are you able to share some more details on how such file are currently handled by your project?
Regards
how your extracted files are effectively installed on the target machine?
Probably, you didn't use any "Install command" with them and consequently, the same may be not part of the "effective installation process".
Are you able to share some more details on how such file are currently handled by your project?
Regards
Francesco Toscano
InstallAware Software
White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE
InstallAware Software
White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE
Re: Remove Files/Folders in Maintenance
They are just installed using the Extract 7zip Archive command into the target folder. Correct, I am not using the install command for these files. That mechanism did not work because of what we are trying to do, so the Extract archive works for installation purposes.
Re: Remove Files/Folders in Maintenance
Here is the code I am using in the "Perform first time or maintenance installation" region:
Comment: Install/Re-Install product
Create Shortcut $SHORTCUTFOLDER$\Uninstall #TITLE# to $UNINSTALLLINK$
Comment: Configuration Generator Install
Get Component Configuration Generator Selection State into Variable SELECTED
if Variable SELECTED Equals TRUE
Set Variable PROGRESSTEXT to Installing Configuration Generator
Install Files \Utilities\CFGen\Version.txt to $TARGETDIR$\CFGen, include subfolders
Extract 7Zip Archive $SFXPATH$\Utilities\CFGEN.7z into folder $TARGETDIR$\CFGen
Create Shortcut $DESKTOPDIR$\Configuration File Generator to $TARGETDIR$\CFGen\ConfigFileGenerator.exe
Create Shortcut $SHORTCUTFOLDER$\Configuration File Generator to $TARGETDIR$\CFGen\ConfigFileGenerator.exe, Pin to Start Menu, Pin to Start Screen
end
This is part of the script to remove these files from the uninstall region:
Does File Exist $LOCATION_TO_REMOVE$\$CONFIG_GEN_FOLDER$\ConfigFileGenerator.exe (get result into variable FILE_FOUND)
if Variable FILE_FOUND Equals TRUE
Recursively Delete Files $LOCATION_TO_REMOVE$\$CONFIG_GEN_FOLDER$\*.*
Call DLL Function kernel32.dll->RemoveDirectoryW
end
I tried doing some logic in the maintenance area, but received errors when building that stated I could not put anything into the Wizard loop. Any suggestions would be appreciated as always.
Thanks.
Comment: Install/Re-Install product
Create Shortcut $SHORTCUTFOLDER$\Uninstall #TITLE# to $UNINSTALLLINK$
Comment: Configuration Generator Install
Get Component Configuration Generator Selection State into Variable SELECTED
if Variable SELECTED Equals TRUE
Set Variable PROGRESSTEXT to Installing Configuration Generator
Install Files \Utilities\CFGen\Version.txt to $TARGETDIR$\CFGen, include subfolders
Extract 7Zip Archive $SFXPATH$\Utilities\CFGEN.7z into folder $TARGETDIR$\CFGen
Create Shortcut $DESKTOPDIR$\Configuration File Generator to $TARGETDIR$\CFGen\ConfigFileGenerator.exe
Create Shortcut $SHORTCUTFOLDER$\Configuration File Generator to $TARGETDIR$\CFGen\ConfigFileGenerator.exe, Pin to Start Menu, Pin to Start Screen
end
This is part of the script to remove these files from the uninstall region:
Does File Exist $LOCATION_TO_REMOVE$\$CONFIG_GEN_FOLDER$\ConfigFileGenerator.exe (get result into variable FILE_FOUND)
if Variable FILE_FOUND Equals TRUE
Recursively Delete Files $LOCATION_TO_REMOVE$\$CONFIG_GEN_FOLDER$\*.*
Call DLL Function kernel32.dll->RemoveDirectoryW
end
I tried doing some logic in the maintenance area, but received errors when building that stated I could not put anything into the Wizard loop. Any suggestions would be appreciated as always.
Thanks.
-
- Site Admin
- Posts: 5361
- Joined: Sun Aug 22, 2010 4:28 am
Re: Remove Files/Folders in Maintenance
Dear Mark,
by your information, I don't have a clear picture on when your "deletion block" is exactly sequenced within the "Process (Un)Installation CODE REGION".
Anyway, if place your "deletion block" immediately after the "Apply UnInstall" statement (within the "Perform Uninstallation CODE REGION"), I suppose you should be able to achieve your needs.
In addition, you may also verify the SUCCESS state returned by the Apply UnInstall statement, this in order to skip "the deletion process" in case of errors.
Hope this helps you.
Regards
by your information, I don't have a clear picture on when your "deletion block" is exactly sequenced within the "Process (Un)Installation CODE REGION".
Anyway, if place your "deletion block" immediately after the "Apply UnInstall" statement (within the "Perform Uninstallation CODE REGION"), I suppose you should be able to achieve your needs.
In addition, you may also verify the SUCCESS state returned by the Apply UnInstall statement, this in order to skip "the deletion process" in case of errors.
Hope this helps you.
Regards
Francesco Toscano
InstallAware Software
White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE
InstallAware Software
White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE
Who is online
Users browsing this forum: No registered users and 128 guests