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.
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)
Please log in to answer
Posted by:
AngelD
17 years ago
Posted by:
runtorious
17 years ago
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.
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
17 years ago
Posted by:
AngelD
17 years ago
Posted by:
runtorious
17 years ago
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
so that the conversation will remain readable.