MElkins Posted January 9, 2009 Share Posted January 9, 2009 I've got an AutoScript that uses the RunAsWait command to run a batch job. The batch job works fine except for the NET STOP SPOOLER Command. It gives me an access denied error. #RequireAdmin RunAsWait("myuserid", "mydomain", $MyPassWrd, 0, $RunCmd, $CmdDir) The batch command line that fails with Access Denied is: REM # Stop/Start the spooler service NET STOP SPOOLER NET START SPOOLER If I run the batch job from Explorer using the Windows Run As Administrator prompt it works fine but not in AutoIt. I am using the latest version of AutoIt. I would greatly appreciate any suggestion anyone might offer in helping me solve this. Link to comment Share on other sites More sharing options...
XIRAM Posted April 8, 2013 Share Posted April 8, 2013 Hi, Old thread but Exactly the same problem, that's driving me crazy, I just need it to finish my software. Did you find a solution to that? Or someone else? Thanks for the answer Link to comment Share on other sites More sharing options...
XIRAM Posted April 8, 2013 Share Posted April 8, 2013 Finally, I found a solution which is not perfect but works. I replaced all my RunAsWait by RunWait, and put a #RequireAdmin in the top of the code. With that the spooler restart correctly... 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