SimonJohnG
asked on
VB Script for login
I have created a login script for VPN users, see below (A) This script needs to run in elevated mode but I dont know how to do this with the 'run' command so I created a script (B) to call (A) using 'Execute' command and used the 'RUNAS' option. If I run (A) independantly all the exe's run, if I run (B) only the first exe runs in (A). Why? My preference is to have this in one file but my VB experience is zero and bothched this together, please help. Just need all to run in one file. rgd Simon
(A - scriptrun.vbs)
Dim objShell
Set objShell = WScript.CreateObject( "WScript.Shell" )
objShell.run("ipconfig.exe /registerdns"),0
objShell.run("eventsentry_ upd.exe /server:l-gilkess-pc /group:Laptops /installupdate"),0
objShell.run("iadvisoragnt .exe"),0
Set objShell = Nothing
(B )
Set objShell = CreateObject("Shell.Applic ation")
objShell.ShellExecute "cscript", "o:\softhardaudit\scriptru n.vbs", "", "runas", 0
(A - scriptrun.vbs)
Dim objShell
Set objShell = WScript.CreateObject( "WScript.Shell" )
objShell.run("ipconfig.exe
objShell.run("eventsentry_
objShell.run("iadvisoragnt
Set objShell = Nothing
(B )
Set objShell = CreateObject("Shell.Applic
objShell.ShellExecute "cscript", "o:\softhardaudit\scriptru
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.