Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

RunAs within VBScript

Status
Not open for further replies.

cumpleby

Technical User
Nov 25, 2011
20
GB
Hi, I have a VBScript that will install software on users machines based on a registry check. One of the pieces of software it needs to install is .net framework. Now a lot of the machines users are not local admins of their machine, how can I run this line of the script with runas without the need to pass credentials through:-

if getDotNetVer()<4.7 then showBanner:eek:shell.run localCopy(runFile(1)),showApp,True:wscript.sleep 3000

The runFile(1) command runs the .net Framework install from the required installation folder.

Any help would be appreciated.
 
If you want a VBScript to run a program using RunAs DOS command, go straight to the bottom of the blog. If you want to read the build-up for the final product, keep reading. Time to time I came across I wanted to run a script or program as administrative privileges. The few needs are like, Install a program or do something on client machines via login script, Run a program using a different account
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top