PDA

View Full Version : Custom Uninstall



NewsArchive
10-11-2010, 01:43 AM
Hi Friedrich,

Is the %_SB_INSTALLDIR% active in a custom uninstall, i.e. can I use it with
"Delete Tree" to delete the install folder and all files in it (not
installed, but created by the installed program)? IF not, is there a
generic way to get the install folder?

I know I can get it from the
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Curr entVersion\Uninstall\{PRODUCT_GUID}\InstallFolder
registry key, but that makes the custom uninstall tied to that particular
Product GUID.

Best regards,

--
Arnór Baldvinsson - Icetips Alta LLC
Port Angeles, Washington
www.icetips.com - www.buildautomator.com - www.altawebworks.com

Icetips product subscriptions at http://www.icetips.com/subscribe.php

NewsArchive
10-11-2010, 01:43 AM
Hi Arnór,

Yes, you can use %_SB_INSTALLDIR% in a custom uninstall. The variable
points to the full pathname, excluding the file name, of the uninstall
application currently executing. Similar to the demo in the "Delete
Directories Not Created With my installation" help topic.

Delete Folder "%_SB_INSTALLDIR%\ExtraFolder"
Process Uninstall Queue

Friedrich

NewsArchive
10-11-2010, 01:44 AM
Hi Friedrich,

> Yes, you can use %_SB_INSTALLDIR% in a custom uninstall. The variable
> points to the full pathname, excluding the file name, of the uninstall
> application currently executing. Similar to the demo in the "Delete
> Directories Not Created With my installation" help topic.
>
> Delete Folder "%_SB_INSTALLDIR%\ExtraFolder"
> Process Uninstall Queue

Excellent!

One question: Should this be done before or after "Process Uninstall
Queue"? It seems logical (at least in this case) to do it after the queue
is processed...

Best regards,

--
Arnór Baldvinsson - Icetips Alta LLC
Port Angeles, Washington
www.icetips.com - www.buildautomator.com - www.altawebworks.com

Icetips product subscriptions at http://www.icetips.com/subscribe.php

NewsArchive
10-11-2010, 01:44 AM
Arnór,

>> Delete Folder "%_SB_INSTALLDIR%\ExtraFolder"
>> Process Uninstall Queue
>
> Excellent!
>
> One question: Should this be done before or after "Process Uninstall
> Queue"? It seems logical (at least in this case) to do it after the queue
> is processed...

It depends on your project. If the installer did not create the "extra"
folder, you can do it before the "Process Uninstall Queue". If the
installer created the folder, then you can let "Process Uninstall Queue" do
its uninstall work and after that call "Delete Folder" or "Delete Folder
Tree" or whatever.

Friedrich