Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Vbscript - passing value of variable to dos commandline 1

Status
Not open for further replies.

janjan1

Technical User
May 21, 2016
3
CA
Hi. Is there a way I could pass the value of the variable to DOS commandline?

ID="JohnDoe"
Pwd="1234"

objShell.run """C:\Program Files (x86)\TeamViewer\teamviewer.exe"" -i & ID -P & pwd /C""" ,0

but this works:

objShell.run """C:\Program Files (x86)\TeamViewer\teamviewer.exe"" -i JohnDoe -P 1234 /C""" ,0


Please help. Thanks
 
C:\Program Files (x86)\TeamViewer\teamviewer.exe"" -i " & ID & " -P " & pwd & " /C
 
Hi strongm. It worked!!! Thank you for your help. I appreciated.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top