I am trying to use VBScript to execute and MSI (based on some conditions). The problem I am having is that the path to the MSI has spaces in it, so I tried using Chr(32) but I still get an error stating that I am using incorrect command line parameters. How can I pass the full string to the msiexec.exe and have it run correctly using VBScript?
Code Example:
MSIEXE = "C:\Winnt\system32\msiexec.exe /I "
UpdPath = "X:\MYXP" & Chr(32) & "Update" & Chr(32) & "2 _ \WinXP\Update2\MSISetup\SMSInst.exe"
Set oExec = WshShell.Run(MSIEXE & UpdPath)
Code Example:
MSIEXE = "C:\Winnt\system32\msiexec.exe /I "
UpdPath = "X:\MYXP" & Chr(32) & "Update" & Chr(32) & "2 _ \WinXP\Update2\MSISetup\SMSInst.exe"
Set oExec = WshShell.Run(MSIEXE & UpdPath)