Jump to content

How Do You Run Batch Jobs In Vista


Recommended Posts

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

  • 4 years later...

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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...