Solved

batch file

Posted on 2015-02-13
9
148 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
  • 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
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!

 

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

Ransomware: The New Cyber Threat & How to Stop It

This infographic explains ransomware, type of malware that blocks access to your files or your systems and holds them hostage until a ransom is paid. It also examines the different types of ransomware and explains what you can do to thwart this sinister online threat.  

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Internet Explorer 11.0 fails to open 34 86
VMware-ClientIntegrationPlugins 6 83
Moving a windows 7 install to new hardware 9 108
system default settings 4 26
If you get continual lockouts after changing your Active Directory password, there are several possible reasons.  Two of the most common are using other devices to access your email and stored passwords in the credential manager of windows.
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).
This Micro Tutorial will give you a basic overview of Windows Live Photo Gallery and show you various editing filters and touches to photos you can apply. This will be demonstrated using Windows Live Photo Gallery on Windows 7 operating system.

730 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