/build/static/layout/Breadcrumb_cap_w.png

Need some help with """"" in vbscript

It has been a long day and I'm having some trouble with this section within my script. The *** are just for the forum but do have real information in them.

If FSO.FolderExists(Folder_Path) = true then
Wscript.Quit
Else

WshShell.Run "msiexec /i ""****_***.msi"" /qb UPERFORM_COMPANY_NAME="*****, LLC"
UPERFORM_PRODUCT_ID=Q3GUID-M3QW3X-YVU6KU-P6YQQ7-APYFU-A8U4AF REBOOT=ReallySuppress", 1, True

Any help would be great and the ERROR: Expected end of statement.

0 Comments   [ + ] Show comments

Answers (4)

Posted by: Pudsey 15 years ago
Senior Yellow Belt
0
Maybe something like this

Dim Quotes
Quotes = Chr(34)

If FSO.FolderExists(Folder_Path) = true then

Wscript.Quit

Else

WshShell.Run "msiexec /i " & "****_***.msi" & " /qb UPERFORM_COMPANY_NAME=" & Quotes & "*****, LLC" & Quotes & " UPERFORM_PRODUCT_ID=Q3GUID-M3QW3X-YVU6KU-P6YQQ7-APYFU-A8U4AF REBOOT=ReallySuppress", 1, True

End If
Posted by: RoBolton 15 years ago
Senior Yellow Belt
0
Thanks , I will give it a try...
Posted by: anonymous_9363 15 years ago
Red Belt
0
You'll find your code easier to maintain if you break lengthy lines like this into even smaller chunks. I use this "technique" for things like command lines, SQL statements, stuff like that. Note the use of this forum's CODE tag, BTW:Dim strCommandLine
Const strQuoteMarks = Chr(34)

strCommandLine = ""
strCommandLine = strCommandLine & "msiexec /i"
strCommandLine = strCommandLine & " "
strCommandLine = strCommandLine & "****_***.msi"
strCommandLine = strCommandLine & "/qb"
strCommandLine = strCommandLine & " "
strCommandLine = strCommandLine & "UPERFORM_COMPANY_NAME=" & strQuoteMarks & "*****, LLC" & strQuoteMarks
strCommandLine = strCommandLine & " "
strCommandLine = strCommandLine & "UPERFORM_PRODUCT_ID=Q3GUID-M3QW3X-YVU6KU-P6YQQ7-APYFU-A8U4AF"
strCommandLine = strCommandLine & " "
strCommandLine = strCommandLine & "REBOOT=ReallySuppress"

WshShell.Run strCommandLine, 1, True
Posted by: RoBolton 15 years ago
Senior Yellow Belt
0
Thanks VBScab, I'm just learning along the way.
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
 
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