Jump to content
Sign in to follow this  
Guest wisemto

Run As Domain Admin on Locked Down Machine

Recommended Posts

Guest wisemto

In the RunOnceEx of the registry I have placed a script that was compiled into ViewStar.exe and contains the following code:

; Set the RunAs parameters to use domain admin account

RunAsSet("softinst", "DOMAINNAME", "PASSWORD")

; Run registry editor as admin

RunWait("\\antioch\bpm\rr01\Install\vssetup\setup.exe /s")


; Reset user's permissions


We have our workstations locked down.. I thought with the run as above it would run as the domain admin account. It does run from the directory but will not update the registry. If I log onto the locked machine it runs as a domain admin and the software installs fine.

Any Help would be appreciated.. Thanks

Share this post

Link to post
Share on other sites

I just had the same problem and solved it by using NET USE.

The code below could work for you.

Run("net use z: \\antioch\bpm\rr01\Install\vssetup\ /user:username password /y")

 While DriveStatus("z:\") <> "READY";Checking if Z is ready
 RunWait("z:\setup.exe /s");Running the file 
Run("net use z: /d");Deleting Z
Sleep(5000);Wait 5 seconds

Run("net use x: \\oxfnas1\viewstar\ /user:username password /y")

 While DriveStatus("x:\") <> "READY";Checking if X is ready
 RunWait("x:\icon.bat /s");Running the file 
Run("net use x: /d");Deleting X

Their might be better ways, but this worked for me.

Were ever i lay my script is my home...

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...