insert a variable to cmd command

LabelName doesn’t need to be a shell object, as it’s just a string. Then concatenate the string onto the run command and you are done.

Set oShell = WScript.CreateObject("WScript.Shell")  
Dim LabelName

LabelName = InputBox("Please Enter Label to check-out:", _
  "Create File")
oShell.run "cmd /K ""c:\Program Files (x86)\Borland\StarTeam Cross-Platform Client 2008 R2\stcmd.exe"" co -p bla:[email protected]:7777/bla/ -is -eol on -o -rp D:\ST_test -cfgl  " & LabelName

Leave a Comment