Scripting Question

Passing a variable to an msi.InstallProducts

03/16/2006 4631 views
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


Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.

All Answers

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

Maybe a %20 instead of a backspace?:
Answered 05/24/2006 by: fosteky
Purple Belt

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

ORIGINAL: fosteky

Maybe a %20 instead of a backspace?:

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

Don't be a Stranger!

Sign up today to participate, stay informed, earn points and establish a reputation for yourself!

Sign up! or login

View more:


This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ