PDA

View Full Version : Custom Uninstall Questions



NewsArchive
08-23-2007, 01:23 AM
I am writing a custom unstall script and have some questions:

1. Once the uninstall script is included in my main script, can I use all the
compiler variables, runtime variables, installer flags, and constants defined
or set in my main install script?

2. Assuming that I can do #1 above, what values will these have when the
uninstall runs, the last values they had at the end of the install script?

3. I know the normal uninstall log should allow uninstalling shortcuts but
when I unstalled a test with one shortcut, the shortcut was not uninstalled.
In the uninstall script, how do I delete shortcuts for All Users and/or the
currently logged-in user? Can I use the $SB_ALLUSERSFLAG$ flag to see how they
were installed?

I'm sure I'll have more questions later but this is all I can think of right now.

Peter Gysegem
Beaver Creek Software

NewsArchive
08-23-2007, 01:23 AM
I guess I just answered part of question #1. In the uninstall script I used a
runtime variable (%DATAPATH%) that I had defined in the main install script and
got a compile error. I can use %_SB_INSTALLDIR% with no problem though.

Peter Gysegem
Beaver Creek Software

NewsArchive
08-23-2007, 01:24 AM
#3. In your script, is the offending shortcut installed before or after the
"Create Installation Log "[LogName]" script item?

Jane

NewsArchive
08-23-2007, 01:25 AM
Peter,

>I am writing a custom unstall script and have some questions:
>
> 1. Once the uninstall script is included in my main script, can I use all
> the compiler variables, runtime variables, installer flags, and constants
> defined or set in my main install script?

The uninstall script has its own set of runtime variables. Both the install
and uninstall scripts share the same compiler variables.

> 2. Assuming that I can do #1 above, what values will these have when the
> uninstall runs, the last values they had at the end of the install script?

See above.

"Standard" installer runtime variables are available and pre-set (e.g.
%WINVER%, %_CSIDL_APPDATA%, etc.) in the uninstall application. The
%_SB_INSTALLDIR% points to the location where the uninstall executable
is located in.

> 3. I know the normal uninstall log should allow uninstalling shortcuts
> but when I unstalled a test with one shortcut, the shortcut was not
> uninstalled. In the uninstall script, how do I delete shortcuts for All
> Users and/or the currently logged-in user? Can I use the $SB_ALLUSERSFLAG$
> flag to see how they were installed?

Shortcuts are nothing more (or less) than files. To remove shortcuts not
installed by SetupBuilder (or not listed in the uninstall .log), you can use
the "Delete File(s)..." script function.

For example, use the %_CSIDL_PROGRAMS% runtime variable to delete shortcuts
installed to the user's program groups. A typical path is C:\Documents and
Settings\username\Start Menu\Programs.

Use %_CSIDL_COMMON_PROGRAMS% to delete shortcuts installed to the
directories for the common program groups that appear on the Start menu for
all users. A typical path is C:\Documents and Settings\All Users\Start
Menu\Programs.

Does this help?

Friedrich

--
Friedrich Linder
Lindersoft
www.lindersoft.com
+1.954.252.3910

"point. click. ship" - that's SetupBuilder 6.5
Create Windows Vista ready installations in minutes

-- Official Comodo Code Signing and SSL Certificate Partner