How to pass parameters from a vbs to a batch

March 28, 2011 at 07:45:10
Specs: Windows XP
I receive parameters in my vbs and i need to pass them to a batch. Vbs code is like this,

Set WshShell = CreateObject("WScript.Shell")
Set ArgObj = WScript.Arguments

if WScript.Arguments.Count = 1 then
var1 = ArgObj.Item(0)
WshShell.Run chr(34) & "C:\share\InstallproAgent-1.0.10_SR6_V3.0\InstallHide.bat" & var1 & Chr(34), 0

end if

Set WshShell = Nothing

But this is not working. I am passing the argument right ? Can someone help me with this ?


See More: How to pass parameters from a vbs to a batch

Report •

#1
March 28, 2011 at 09:32:40
I think you missed the space after the "T"...

WshShell.Run chr(34) & "C:\share\InstallproAgent-1.0.10_SR6_V3.0\InstallHide.bat " & var1 & Chr(34), 0


Report •
Related Solutions


Ask Question