/bundles/itninjaweb/img/Breadcrumb_cap_w.png
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   [ - ] Hide 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.
Answer this question or Comment on this question for clarity

Answers

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.
Answered 08/08/2007 by: AngelD
Red Belt

Please log in to comment
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.
Answered 08/09/2007 by: runtorious
Senior Yellow Belt

Please log in to comment
0
I'm always glad when users provide their solutions for others.

Cheers!
Answered 08/09/2007 by: AngelD
Red Belt

Please log in to comment
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.
Answered 08/09/2007 by: AngelD
Red Belt

Please log in to comment
0
I'm only using the value to grab an initial configuation file from a CIFS share.

Thanks for the hint though.

Dwayne.
Answered 08/09/2007 by: runtorious
Senior Yellow Belt

Please log in to comment