Hello
I'm trying to add a variable to a shell command in a vb scirpt.
(Newish to scripting)
I want to get the IP address, MasK and Gateway inputs and add them to the
shell command as in the below command.
CODE
Sub Manual_IP
ipAnswer = window.prompt("Please enter your IP address")
maskAnswer = window.prompt("Please enter the mask")
gatewayAnswer = window.prompt("Please enter the gateway IP address")
strIPHost=ipAnswer
strmaskHost=strAnswer
strgateway=gatewayAnswer
Set WShell = CreateObject("WScript.Shell")
WShell.exec("netsh interface ip set address local static strIPHost
strmaskHost strgateway 1")
end sub
My question is can this be done, or am I missing thre syntax for putting the
variables into the command.
any suggestions?
Thanks
D
--
Dee
Bookmarks