When have multiple regions and when the update site lays down the msi we use a vbs custom action to set the 'INSTALLTOREGION' property so when the client gets the update the correct config files are installed. On Windows Server 2016 the vbs doesn't always run because of admin rights. If I run the install with an admin console it installs fine, but otherwise it errors. Below is the vbs code i wrote a couple years ago and has been fine since this server move. Is there a better way to do this? We're using AI 14.0.2
Code: Select all
'get the passed in variables
customactiondata = Session.Property("CustomActionData")
actiondata = Split(customactiondata, "|")
'check if the msi is there
Set fso = CreateObject("Scripting.FileSystemObject")
If (fso.FileExists(actiondata(1) & "\MyInstall.msi")) Then
set o_installer = CreateObject("WindowsInstaller.Installer")
set o_database = o_Installer.OpenDatabase(actiondata(1) & "\MyInstall.msi", 1)
'set the installtoregion
Set o_MSIView = o_database.OpenView("UPDATE Property SET Value = '" & actiondata(0) & "' WHERE Property = 'INSTALLTOREGION'")
o_MSIView.Execute
o_DataBase.Commit
Else
return 1
End If
FOLLOW US
Get the latest news in Application Packaging