VBscript syntax problem

brunswickite

Diamond Member
Jul 23, 2002
6,386
1
0
I am trying to do a simple wshshell.run on this command line, but i am having trouble with the syntax. I tried double quotes "" around the whole thing but it did not take.

"C:\Program Files\vizioncore\esxRanger Professional\esxRangerProCli.exe" SERVER.DOMAIN.COM "[VMFS-3] LIT-CITRIX/LIT-CITRIX.vmx" -copylocal E:\LIT-CITRIX -drives:all -compratio 1 -zipname [config]_[month]_[day]_[year] -onlyon -nospacecheck -retendays 3


In bold is exactly how i need to run it.
So the question is where do i put the quotes. The line above represents how I am running this as currently as a scheduled task.

Ideas?

TIA
 

kzrssk

Member
Nov 13, 2005
111
0
0
For that beginning ", you'll need a "" so if you're defining a variable, you'll need """ total. If there's not going to be a " at the end, probably just ". I relatively suck at VBScript though, so don't "quote" me, ahahahaha.
 

gsellis

Diamond Member
Dec 4, 2003
6,061
0
0
Originally posted by: brunswickite
I am trying to do a simple wshshell.run on this command line, but i am having trouble with the syntax. I tried double quotes "" around the whole thing but it did not take.

"C:\Program Files\vizioncore\esxRanger Professional\esxRangerProCli.exe" SERVER.DOMAIN.COM "[VMFS-3] LIT-CITRIX/LIT-CITRIX.vmx" -copylocal E:\LIT-CITRIX -drives:all -compratio 1 -zipname [config]_[month]_[day]_[year] -onlyon -nospacecheck -retendays 3


In bold is exactly how i need to run it.
So the question is where do i put the quotes. The line above represents how I am running this as currently as a scheduled task.

Ideas?

TIA

str = chr(34) & "C:\Program Files\vizioncore\esxRanger Professional\esxRangerProCli.exe" & chr(34) & " SERVER.DOMAIN.COM " & chr(34) & "[VMFS-3] LIT-CITRIX/LIT-CITRIX.vmx" & chr(34) & " -copylocal E:\LIT-CITRIX -drives:all -compratio 1 -zipname [config]_[month]_[day]_[year] -onlyon -nospacecheck -retendays 3"

If month day and year are vars too, you will need to use "...[" & config & "]_[" & month & "]_[" & ... etc.
 

brunswickite

Diamond Member
Jul 23, 2002
6,386
1
0
Originally posted by: kzrssk
For that beginning ", you'll need a "" so if you're defining a variable, you'll need """ total. If there's not going to be a " at the end, probably just ". I relatively suck at VBScript though, so don't "quote" me, ahahahaha.

The " ' s are confusing me. Can you copy paste the line, using my line. :)
 

gsellis

Diamond Member
Dec 4, 2003
6,061
0
0
Originally posted by: brunswickite
Originally posted by: kzrssk
For that beginning ", you'll need a "" so if you're defining a variable, you'll need """ total. If there's not going to be a " at the end, probably just ". I relatively suck at VBScript though, so don't "quote" me, ahahahaha.

The " ' s are confusing me. Can you copy paste the line, using my line. :)
??? I gave you the answer. You then Run the str. Chr(34) = " (quote)