Solved

batch file

Posted on 2015-02-13
9
152 Views
Last Modified: 2015-02-13
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?
0
Comment
Question by:mkramer777
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 4
9 Comments
 
LVL 34

Expert Comment

by:Paul MacDonald
ID: 40607909
net start spooler
0
 

Author Comment

by:mkramer777
ID: 40607924
any way to force it to run as administrator?  Right now I have to right click it and run as admin.
0
 
LVL 34

Accepted Solution

by:
Paul MacDonald earned 500 total points
ID: 40607929
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:mkramer777
ID: 40607951
My run program as admin is grayed out
0
 
LVL 34

Expert Comment

by:Paul MacDonald
ID: 40607967
Create another batch file to run the first batch file as Administrator:

runas /savecred /profile /user:Administrator yourbatch.bat
0
 

Author Comment

by:mkramer777
ID: 40608031
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
 
LVL 34

Expert Comment

by:Paul MacDonald
ID: 40608098
"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
 

Author Comment

by:mkramer777
ID: 40608129
Thanks for your help.  I was able to convert it to an exe file and then I could tick run as admin.
0
 
LVL 34

Expert Comment

by:Paul MacDonald
ID: 40608133
Excellent!  Very happy to help.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
On some Windows 7 (SP1) computers, Windows Update becomes super slow even the computer is reasonably fast.  There's one solution that seemed to have worked well for me (after trying a few other suggested solutions).
Simple Linear Regression
Starting up a Project

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question