troubleshooting Question

VB Script for login

Avatar of SimonJohnG
SimonJohnG asked on
Windows NetworkingVB ScriptNetwork Operations
2 Comments2 Solutions1069 ViewsLast Modified:
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" )"ipconfig.exe /registerdns"),0"eventsentry_upd.exe /server:l-gilkess-pc /group:Laptops /installupdate"),0"iadvisoragnt.exe"),0
Set objShell = Nothing

(B )
Set objShell = CreateObject("Shell.Application")
objShell.ShellExecute "cscript", "o:\softhardaudit\scriptrun.vbs", "", "runas", 0

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 2 Answers and 2 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 2 Answers and 2 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros