• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 160
  • Last Modified:

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?
0
mkramer777
Asked:
mkramer777
  • 5
  • 4
1 Solution
 
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
 
Paul MacDonaldDirector, Information SystemsCommented:
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
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

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

  • 5
  • 4
Tackle projects and never again get stuck behind a technical roadblock.
Join Now