Saving variables to use with uninstall.

Got a problem you cannot solve? Try here.
Treoxx
Posts: 24
Joined: Fri Jan 27, 2006 6:29 am

Saving variables to use with uninstall.

Postby Treoxx » Fri Apr 07, 2006 8:50 am

Is there a possibility to save variables (maybe in the msi file) so I can use them within the uninstall dialogs?

MichaelNesmith
Posts: 3452
Joined: Thu Dec 22, 2005 7:17 pm
Contact:

Postby MichaelNesmith » Fri Apr 07, 2006 10:30 am

Hi Treoxx!

This capability is not currently available - variables that you need must be saved either in the registry, or in text files, or in some other way you would like to reuse them.

However this was a top feature request, so I am happy to say our development team has added a new "Persist" option to the Set Variable command, which, when checked, automatically saves variable values.

This will be available in an update coming soon!
Michael Nesmith
InstallAware
Home of The Next Generation MSI Installer
Get your free copy today - http://www.installaware.com/

Treoxx
Posts: 24
Joined: Fri Jan 27, 2006 6:29 am

Postby Treoxx » Wed Apr 26, 2006 9:55 am

OK Michael thanks!.

Then the next thing:

When I request the variable $TARGETDIR$ in the maintenance dialog I get the following answer:

"C:\\Program files\\$NAMEOFAVARIABLE$"

That was not what I expected.
(Yes I've changed the variable $title$ in the Target Folder by Project Properties.)

Where can I find the right dir from the installed program.

jimo
Posts: 342
Joined: Fri Aug 19, 2005 10:59 am
Location: Atlanta, GA
Contact:

Postby jimo » Wed Apr 26, 2006 10:54 am

You will need to get the path from an existing registry entry that you created during the install or search for your application executable.
Jim Oswell
Software Engineering Manager, Dental
Greenway Health, LLC
http://greenwaymedical.com

MichaelNesmith
Posts: 3452
Joined: Thu Dec 22, 2005 7:17 pm
Contact:

Postby MichaelNesmith » Wed Apr 26, 2006 2:32 pm

TARGETDIR is preserved automatically but I guess setting it to another variable causes this issue.
Michael Nesmith

InstallAware

Home of The Next Generation MSI Installer

Get your free copy today - http://www.installaware.com/

Treoxx
Posts: 24
Joined: Fri Jan 27, 2006 6:29 am

Postby Treoxx » Thu Apr 27, 2006 5:08 am

@Jimo:

Thats not an option because I use multiple instances.
With different titles, (the user can set the title by himself) but thanks anyway.

@ Michael...

Seems like a bug.

MichaelNesmith
Posts: 3452
Joined: Thu Dec 22, 2005 7:17 pm
Contact:

Postby MichaelNesmith » Thu Apr 27, 2006 7:48 am

What happens when you print out the variable with a MessageBox?
Michael Nesmith

InstallAware

Home of The Next Generation MSI Installer

Get your free copy today - http://www.installaware.com/

Treoxx
Posts: 24
Joined: Fri Jan 27, 2006 6:29 am

Postby Treoxx » Fri Apr 28, 2006 4:44 am

The first thing I did to see if the variable TARGETDIR exists in the maintenance was to get it by an messagebox.
And there was the "c:\\program files\\$VAR$" message.

MichaelNesmith
Posts: 3452
Joined: Thu Dec 22, 2005 7:17 pm
Contact:

Postby MichaelNesmith » Sat Apr 29, 2006 2:21 pm

That can only mean that $VAR$ is not defined the second time round. Make sure your script execution path always defines it.
Michael Nesmith

InstallAware

Home of The Next Generation MSI Installer

Get your free copy today - http://www.installaware.com/

Treoxx
Posts: 24
Joined: Fri Jan 27, 2006 6:29 am

Postby Treoxx » Mon May 15, 2006 8:15 am

That would be very weird Michael, I've changed by project properties the target folder to $programfiles$$servicename$ in stead of $programfiles$$title$

It's up to installaware to resolve that variable the right way so it's usable in the maintenance as !text! in the $targetdir$ variable.

MichaelNesmith
Posts: 3452
Joined: Thu Dec 22, 2005 7:17 pm
Contact:

Postby MichaelNesmith » Mon May 15, 2006 3:06 pm

I would step through the code line by line in the debugger in maintenance mode to see what is going wrong.
Michael Nesmith

InstallAware

Home of The Next Generation MSI Installer

Get your free copy today - http://www.installaware.com/

Treoxx
Posts: 24
Joined: Fri Jan 27, 2006 6:29 am

Postby Treoxx » Thu May 18, 2006 5:12 am

If I change $TIME$ in another variable lets say $SERVICENAME$
(In project properties, targetdir)

The value of $SERVICENAME$ is 12345

Because I'm making an installer for multiple instances the user has to choose the title for the software. This is written in $SERVICENAME$

The user changes it to 54321.

He finished the installation, and goes to uninstallation..

Messagebox with $TARGETDIR$ "C\\programfiles\\\"


Well.... I give up :) will wait at the option for variables for install and maintenance, I really need it, not only for the targetdir.


Return to “Technical Support”

Who is online

Users browsing this forum: No registered users and 136 guests