New to VBScipt (Old in Winbatch...) In our environment, we need to run installs from long path names with spaces. How do I pass the sCommandPath variable to the ??? below. I tried everything I could think of with combinations of parens, quotes, none, some, etc. I'm sure it's something simple I'm missing here. It works fine if I eliminate the space in the path statement and actual dir, then don't need to nbsp code, but those spaces are going to stay, so...need to get around them. Thanks for any assistance

Dim nbsp, sCommandPath, sPath
sPath="\\dwdsetup\prod\Apps\Lexis-Nexis\Lexis7215\Automated Install\LexisNexis.msi"
nbsp = Chr(160)
sCommandPath = replace(sPath, " ", nbsp)
Set msi = CreateObject("WindowsInstaller.Installer")
msi.UILevel = 4
msi.InstallProducts ???
0 Comments   [ + ] Show 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.

Answers

0
Didn't you mean "msi.InstallProduct" (singular)?
Answered 03/23/2006 by: WiseUser
Fourth Degree Brown Belt

Please log in to comment
0
Maybe a %20 instead of a backspace?:
sPath="\\dwdsetup\prod\Apps\Lexis-Nexis\Lexis7215\Automated%20Install\LexisNexis.msi"
Answered 05/24/2006 by: fosteky
Purple Belt

Please log in to comment
0
sPath=CHR(34) & "\\dwdsetup\prod\Apps\Lexis-Nexis\Lexis7215\Automated Install\LexisNexis.msi" & CHR(34)



CHR(34) is equal to a quotation mark. Another way would be to duplicate the quotation marks as in: sPath="""\\dwdsetup\prod\Apps\Lexis-Nexis\Lexis7215\Automated Install\LexisNexis.msi"""
Answered 05/25/2006 by: brenthunter2005
Fifth Degree Brown Belt

Please log in to comment
0
ORIGINAL: fosteky

Maybe a %20 instead of a backspace?:
sPath="\\dwdsetup\prod\Apps\Lexis-Nexis\Lexis7215\Automated%20Install\LexisNexis.msi"


I would give this one a try, as i have found %20 helps me out a lot.
Answered 05/30/2006 by: Thegunner
Second Degree Green Belt

Please log in to comment
Answer this question or Comment on this question for clarity