jeansaad Posted February 23, 2005 Share Posted February 23, 2005 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!!! Link to comment Share on other sites More sharing options...
Guest LizJ Posted February 23, 2005 Share Posted February 23, 2005 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}> Link to comment Share on other sites More sharing options...
Wb-FreeKill Posted February 23, 2005 Share Posted February 23, 2005 (edited) 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!? Edited February 23, 2005 by Wb-FreeKill Link to comment Share on other sites More sharing options...
Developers Jos Posted February 23, 2005 Developers Share Posted February 23, 2005 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. Link to comment Share on other sites More sharing options...
jeansaad Posted February 23, 2005 Author Share Posted February 23, 2005 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.') Link to comment Share on other sites More sharing options...
Developers Jos Posted February 23, 2005 Developers Share Posted February 23, 2005 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. Link to comment Share on other sites More sharing options...
jeansaad Posted February 23, 2005 Author Share Posted February 23, 2005 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. Link to comment Share on other sites More sharing options...
Developers Jos Posted February 23, 2005 Developers Share Posted February 23, 2005 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. Link to comment Share on other sites More sharing options...
jeansaad Posted February 23, 2005 Author Share Posted February 23, 2005 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. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now