Is it possible to set an msi to be installed to the variable %SYSTEMDRIVE%?

I have made a property INSTALLDIR=%SYSTEMDRIVE%\Apps. This is not working, any idea why?
0 Comments   [ + ] Show Comments

Comments

Please log in to comment

Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.

Answers

0
It looks like you're trying to use the %SYSTEMDRIVE% environment variable. In WI, such variables only use the '%' sign as a prefix, not as a prefix and suffix. Also, all properties need to be enclosed in square brackets. Next, the trailing backslash is inserted automatically. Thus, you need:

INSTALLDIR=[%SYSTEMDRIVE]Apps

BTW, you should not use the Property table to set this property, as property resolution-ordering is random, so you couldn't guarantee that the SystemDrive property was retrieved before the engine had already tried to resolve INSTALLDIR. Use a 'Set Property' Custom Action.

Lastly, have you looked at using the ROOTDRIVE property?
Answered 02/04/2009 by: VBScab
Red Belt

Please log in to comment
0
I tried using the following suggestion

INSTALLDIR=[%SYSTEMDRIVE]Apps

This gave me also the same error message: Error 1606 (Could not access networklocation [%SYSTEMDRIVE]\Apps
I also tried with the windowsvaraiable ROOTDRIVE this gave me same error message


You wrote
BTW, you should not use the Property table to set this property, as property resolution-ordering is random, so you couldn't guarantee that the SystemDrive property was retrieved before the engine had already tried to resolve INSTALLDIR. Use a 'Set Property' Custom Action.

Im not sure if i follow you here can you be a mroe specific
Answered 02/04/2009 by: Bankeralle
Second Degree Blue Belt

Please log in to comment
0
Where are you setting the property? In the MSI or MST? On the command line?
Answered 02/04/2009 by: VBScab
Red Belt

Please log in to comment
0
I have set the property in the msi, sorry not for being more specific previous time.

By the way it works when using the cmdline msiexec /I filename.msi INSTALLDIR=%SYSTEMDRIVE%\Apps
But as i said i would like to build this in the msi
Answered 02/04/2009 by: Bankeralle
Second Degree Blue Belt

Please log in to comment
0
Use a set property custom action with [%SYSTEMDRIVE]\Apps\
Answered 02/04/2009 by: AngelD
Red Belt

Please log in to comment
0
[%SYSTEMDRIVE]\Apps\

Somehow i cant seem this to work
I have created and SETPROPERY CUSTOM ACTION
Custom Action Name: XX
Property: INSTALLDIR
Property Value: [%SYSTEMDRIVE]\Apps\

This seems like it have no effect what so ever, is it something i missing here
Answered 02/04/2009 by: Bankeralle
Second Degree Blue Belt

Please log in to comment
0
You will, of course, have run the installation with a verbose log, to see if your CA ran at all...?
Answered 02/05/2009 by: VBScab
Red Belt

Please log in to comment
0
Finally it works now. Thx for the help Angeld And VBScab
Answered 02/05/2009 by: Bankeralle
Second Degree Blue Belt

Please log in to comment
0
Please post what fixed it so others can benifit of the solution.
Answered 02/05/2009 by: AngelD
Red Belt

Please log in to comment
Answer this question or Comment on this question for clarity