Vbscript

Closed
nirmal - Nov 4, 2015 at 01:15 AM
Hello,
i need add an route using vb script and need run that script in domain users with admin rights.Below coding helps me to add with admin rights but need to add the route with admin rights for domain users.

Dim WSHShell
Set WSHShell = wscript.createObject("wscript.shell")
WshShell.run "runas /user:administrator\user %comspec%" 'Open command prompt
WScript.Sleep 1000
WshShell.SendKeys "password" 'send password
WshShell.SendKeys "{ENTER}"
WScript.Sleep 1000
Call WSHShell.Run("cmd.exe /C route delete 144.163.0.0")
Call WSHShell.Run("cmd.exe /C route delete 144.163.128.0")
Call WSHShell.Run("cmd.exe /C route delete 151.138.16.0")
Call WSHShell.Run("cmd.exe /C route delete 158.95.0.0")
Call WSHShell.Run("cmd.exe /C route add 144.163.0.0 mask 255.255.0.0 172.17.9.253")
Call WSHShell.Run("cmd.exe /C route add 158.95.0.0 mask 255.255.0.0 172.17.11.253")
Call WSHShell.Run("cmd.exe /C route add 151.138.16.0 mask 255.255.254.0 172.17.11.253")
Set WSHShell = Nothing