PDA

View Full Version : Creating a bat file to start a service...


Joe 90
19-10-2007, 10:38
Just wondering if anybody could offer some advice...

I've created a quick batch file this morning to start the print spooler service as we're having problems with it not starting on some student PCs...

Now, how can i get the bat file to 'run as' the local admin to run the command as it (in a perfect world) will be ran by staff under a standard user session.

Daz
19-10-2007, 10:42
You cant using any built in commands (runas wont accept a password that's not passed interactively). You need to identify why the spooler isn't starting, it's generally quite a reliable service on it's own so I'd imagine it'd be something fairly fatal.

The outside answer would be to grant non-admins rights to control the spooler service, but that's gonna be fiddly to set up centrally.

Joe 90
19-10-2007, 10:56
yeah - cheers daz, you never fail to get a speedy reply on all my 'techy' threads!

it certainly is a worrying issue - its only happening randomly at the moment so i just wanted an easy way of just running the file and not having to confuse some of our less technically minded support staff.

ah well - thanks again :)