batch file

I need to write a batch file in notepad to start the print spooler service if it has stopped.  Can anyone help me with that?
mkramer777Asked:
Who is Participating?
 
Paul MacDonaldConnect With a Mentor Director, Information SystemsCommented:
0
 
Paul MacDonaldDirector, Information SystemsCommented:
net start spooler
0
 
mkramer777Author Commented:
any way to force it to run as administrator?  Right now I have to right click it and run as admin.
0
Cloud Class® Course: CompTIA Cloud+

The CompTIA Cloud+ Basic training course will teach you about cloud concepts and models, data storage, networking, and network infrastructure.

 
mkramer777Author Commented:
My run program as admin is grayed out
0
 
Paul MacDonaldDirector, Information SystemsCommented:
Create another batch file to run the first batch file as Administrator:

runas /savecred /profile /user:Administrator yourbatch.bat
0
 
mkramer777Author Commented:
other than typing in the name of the batch file instead of your batch.bat, is there any other specific info I need to input?  How does it know that I am talking about the batch file on the desktop?
0
 
Paul MacDonaldDirector, Information SystemsCommented:
"How does it know that I am talking about the batch file on the desktop?"
If you mean "How will it find where I've put the batch file I want to run?" you would include the path to the batch file as part of yourbatch.bat.  The "savecred" will prompt you for the password when you run it and save that password for future executions.
0
 
mkramer777Author Commented:
Thanks for your help.  I was able to convert it to an exe file and then I could tick run as admin.
0
 
Paul MacDonaldDirector, Information SystemsCommented:
Excellent!  Very happy to help.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.