19-10-2007, 10:38 | #1 |
Absinthe
Join Date: Jan 2007
Location: Chester
Posts: 2,345
|
Creating a bat file to start a service...
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. |
19-10-2007, 10:42 | #2 |
The Stig
Join Date: Jun 2006
Location: Swad!
Posts: 10,713
|
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.
__________________
apt-get moo |
19-10-2007, 10:56 | #3 |
Absinthe
Join Date: Jan 2007
Location: Chester
Posts: 2,345
|
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 |
Thread Tools | |
Display Modes | |
|
|