Build your command in a more structured way - e.g:
Option Explicit
Function qq(s) : qq = """" & s & """" : End Function
Dim sLabel : sLabel = "default label"
Dim oWAU : Set oWAU = WScript.Arguments.Unnamed
If 1 <= oWAU.Count Then sLabel = oWAU(0)
Dim sCmd : sCmd = Join(Array( _
"%comspec%" _
, "/K" _
, qq("c:Program Files (x86)BorlandStarTeam Cross-Platform Client 2008 R2stcmd.exe") _
, "co" _
, "-p bla:bla123@123.com:7777/bla/" _
, "-is -eol on -o -rp" _
, qq(sLabel) _
))
WScript.Echo sCmd
and display the extra variable sCmd. Fixing (possible) blunders -
ient 2008 R2stcm
---------^^^
'on second thought' additions -
, qq(sLabel) _
==>
, qq("D:ST_test") _
, "-cfgl" _
, sLabel _
and the quoting will be much easier.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…