/build/static/layout/Breadcrumb_cap_w.png

MSI Properties.

Hi,

I'm trying to edit a MSI so that the installer will grab a unique configuration file from a file server on a per computer basis. It works fine until I try to use the MSI property [ComputerName] in the path to the config file. Currently I have a property called CFGFILE with a value of \\computer.w3.corp.ca\deploy\[ComputerName]\install.cfg. When the installer errors out it shows the [ComputerName] property was not resolved to the computer name.

Any help would be appreciated.

Thanks,

Dwayne.

0 Comments   [ + ] Show comments

Answers (5)

Posted by: AngelD 16 years ago
Red Belt
0
Property values cannot resolve other property values, so you would need to use a custom action to set the value of the property instead.
Posted by: runtorious 16 years ago
Senior Yellow Belt
0
Thanks for the help.

After reading your post I was able to figure out how to fix this. Here is what I did, just in case someone else has a similar problem:


1. Created a VBScript to set the CFGFILE to the path:



====== GetComputerName.vbs======



Set objShell = CreateObject("WScript.Shell")



Dim ComputerName

ComputerName = objShell.ExpandEnvironmentStrings("%COMPUTERNAME%")



If (ComputerName <> EMPTY ) then

Session.Property("CFGFILE") = "\\server.w3.corp.ca\Deploy\" + ComputerName + "\Install.cfg"

End If



====== END =====================





2. Added the script to the 'Binary' Table in the MSI with Orca with the following values:



Name: GetComputerName

Data: (Imported the GetComputerName.vbs file)



3. Added a custom action in the 'CustomAction' Table with the following values:



Action: SetCFGFILE

Type: 6

Source: GetComputerName

Target: (Blank)



4. Added an instruction to the 'InstallExecuteSequence' table with the following values:



Action: SetCFGFILE

Condition: (Blank)

Sequence: 2 (Wanted to make sure that it was set before it was used any where)



Thanks again,

Dwayne.
Posted by: AngelD 16 years ago
Red Belt
0
I'm always glad when users provide their solutions for others.

Cheers!
Posted by: AngelD 16 years ago
Red Belt
0
Are you for any chance writing the property value to the registry?
In that case you could always use \\server.w3.corp.ca\Deploy\[%COMPUTERNAME]\Install.cfg as the value in the Registry table.
Posted by: runtorious 16 years ago
Senior Yellow Belt
0
I'm only using the value to grab an initial configuation file from a CIFS share.

Thanks for the hint though.

Dwayne.
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ