Hi All
I am trying to create a vbscript to check public properties that are entered as a part of /quiet install command line parameters of an exe installer.
The command line reads like this;
F:\TACSInstallation.exe /i // /l*v install.log DB_TYPE="SQL" LIC_KEY="" PRD_NAME="vcsNSWPFFeb2014" PRD_SERVER="TTG820" TRN_NAME="vcsNSWPFFeb2014" TRN_SERVER="TTG820" TST_NAME="vcsNSWPFFeb2014" TST_SERVER="TTG820"
My VBSript is setup as a Custom Action before Searches and is intended to check that the public properties all have values and to abort the install if a value is missing.
I am testing the LIC_KEY to see if a value is entered with the following script
Function WriteToLog()
dim rec
Const MsgType = &H04000000
dim UILevel, DB_TYPE, LIC_KEY,PRD_NAME, PRD_SERVER
Set rec = Installer.CreateRecord(1)
UILevel = CStr(Session.Property("UILevel"))
DB_TYPE = CStr(Session.Property("DB_TYPE"))
LIC_KEY = CStr(Session.Property("LIC_KEY"))
PRD_NAME = CStr(Session.Property("PRD_NAME"))
PRD_SERVER = CStr(Session.Property("PRD_SERVER"))
if len(LIC_KEY) = 0 then
rec.StringData(1) = "LIC_KEY is blank"
Session.Message MsgType, rec
WriteToLog = 0
System.Exception("TACSERR002 An exception has occurred. LIC_KEY must have a value")
end if
End Function
Function IIf( expr, truepart, falsepart )
IIf = falsepart
If expr Then IIf = truepart
End Function
My problem is that where the user enters LIC_KEY="" in the command line parameters LIC_KEY ends up in msi process having a value "PRD_NAME=vcsNSWPFFeb2014" without the quotes
Is there a way of getting around this with one of the following
1. exe command line delimiters
2. Another function in Advanced Installer that will allow me to verify data entered as part of the bootstrapper.
3. What is best practice for this sort of scenario for Windows Installer.
Thank you in advance for any help with this issue.
Cheers
Rob
Advanced Installer Professional version 14.5.2 build 83143