How to create a batch file with the runas command and inputting password

Hi guys,

We have this scenario.

Windows 2003 AD Domain.
Remote users sometimes have problems with their printers which are fixed by myself remoteing in and starting and stopping the spooler service.
Id like to be able to place a script on the users desktop that they can run when they have the printer issue, so that I can give ownership of this task to them, instead of them ringing me.
I dont want to elevate their user permissions or place the users in a group such as power users.
I want to be able to create a script which runs as admin or as a user that has the power to start and stop the spooler service.
I know that the runas command has no way of automatically entering the password, and was wondering how I can achieve my goal, so that I dont get calls for this support.

Any help greatly appreciated.

Simon
LVL 1
Simon336697Asked:
Who is Participating?
 
Debsyl99Connect With a Mentor Commented:
Hi

You should be able to enable this through group policy. You'd need to make sure your pc's are in an OU, or edit their existing OU. Then in the GPO attached to the OU - navigate to Computer Configuration - Windows Settings - Security Settings - System Services. Double-click the print spooler, enable automatic startup and give domain users group permissions to read, stop and start the service.

They should then hopefully be able to run the batch under their own credentials,

Deb :))

0
 
fl1pp3r1Connect With a Mentor Commented:
Hi

There is a tool on the market wich I use: TQCrunas
http://www.quimeras.com/products/products.asp
With this tool you can execute scripts with elevated priviliges whitout showing passwords.

Philip

0
 
Simon336697Author Commented:
Thanks Deb, Phil....appreciate it.

Simon
0
All Courses

From novice to tech pro — start learning today.