Jump to content
Sign in to follow this  
jeansaad

RunAsSet() from Network as Local Admin

Recommended Posts

I was wondering if there was a way to use the RunAsSet() cmd to run something from a network on the local computer with local admin privaleges. This is what I've tried so far...

I have a file on the network that copies the files down to the C Drive and executes the file with the RunAsSet() cmd with the local admin privaleges. This doesn't seem to work.

I know that the script works because when I keep the loader/copier script on the C Drive, then it will execute the program... Is there a way that i can still put this on the network without having to use the network administrator credentials?

Thanks in advance for any help!!!

Share this post


Link to post
Share on other sites
Guest LizJ

I was wondering if there was a way to use the RunAsSet() cmd to run something from a network on the local computer with local admin privaleges. This is what I've tried so far...

I have a file on the network that copies the files down to the C Drive and executes the file with the RunAsSet() cmd with the local admin privaleges. This doesn't seem to work.

I know that the script works because when I keep the loader/copier script on the C Drive, then it will execute the program... Is there a way that i can still put this on the network without having to use the network administrator credentials?

Thanks in advance for any help!!!

<{POST_SNAPBACK}>

Share this post


Link to post
Share on other sites

I was wondering if there was a way to use the RunAsSet() cmd to run something from a network on the local computer with local admin privaleges. This is what I've tried so far...

I have a file on the network that copies the files down to the C Drive and executes the file with the RunAsSet() cmd with the local admin privaleges. This doesn't seem to work.

I know that the script works because when I keep the loader/copier script on the C Drive, then it will execute the program... Is there a way that i can still put this on the network without having to use the network administrator credentials?

Thanks in advance for any help!!!

I guess that helped him alot!? :lmao:

Edited by Wb-FreeKill

Share this post


Link to post
Share on other sites

I was wondering if there was a way to use the RunAsSet() cmd to run something from a network on the local computer with local admin privaleges. This is what I've tried so far...

I have a file on the network that copies the files down to the C Drive and executes the file with the RunAsSet() cmd with the local admin privaleges. This doesn't seem to work.

I know that the script works because when I keep the loader/copier script on the C Drive, then it will execute the program... Is there a way that i can still put this on the network without having to use the network administrator credentials?

Thanks in advance for any help!!!

<{POST_SNAPBACK}>

What you describe looks ok... its only not clear what the problem/errors is you get...

Maybe also post the script (section) that is giving you the problem...


SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

The following is some code that i'm trying to use...

In the Script_Loader.exe file it executes another file:

;Script_Loader.exe
Run('C:\WINNT\Script\Loader.exe', '', @SW_HIDE)

In the Loader.exe file it executes the Script.exe file:

;Loader.exe
RunAsSet('Administrator', @ComputerName, 'adminpassword')
RunWait('C:\WINNT\Script\Script.exe')
RunAsSet()

In the Loader.exe file it executes the script file:

;Script.exe
MsgBox(0, 'Loaded', 'This script has been loaded with local admin credentials from a network loader.')

Share this post


Link to post
Share on other sites

The following is some code that i'm trying to use...

In the Script_Loader.exe file it executes another file:

;Script_Loader.exe
Run('C:\WINNT\Script\Loader.exe', '', @SW_HIDE)

In the Loader.exe file it executes the Script.exe file:

;Loader.exe
RunAsSet('Administrator', @ComputerName, 'adminpassword')
RunWait('C:\WINNT\Script\Script.exe')
RunAsSet()

In the Loader.exe file it executes the script file:

;Script.exe
MsgBox(0, 'Loaded', 'This script has been loaded with local admin credentials from a network loader.')

<{POST_SNAPBACK}>

and the error you are getting ?

just one stab in the dark: are you running the script from a share? if so, you might need to specify the workdir on the RunWait() statement .


SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

The error is....

Error: Unable to execute the external program.

The system cannot find the file specified.

This is coming from the Loader.exe file when it tries to run the Script.exe file. Actually the Script.exe file and Loader.exe aren't in the same directory... I am running it from a share.

Share this post


Link to post
Share on other sites

The error is....

Error: Unable to execute the external program.

The system cannot find the file specified.

This is coming from the Loader.exe file when it tries to run the Script.exe file. Actually the Script.exe file and Loader.exe aren't in the same directory... I am running it from a share.

<{POST_SNAPBACK}>

Did you try to add the workdir to your runwait() ? like:

RunWait('C:\WINNT\Script\Script.exe','C:\WINNT\Script')

The issue could be that the path where this script is started from, is unknown when Loader.exe is running 'C:\WINNT\Script\Script.exe' with the Local Administrator credentials......


SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

Hey man... Thanks for the help that was the problem... I thought that making a literal call to the file bypassed the working directory, but i guess i was wrong..

Once again thanks a lot.

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...