Solved

batch file

Posted on 2015-02-13
9
145 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
 

Author Comment

by:mkramer777
ID: 40607951
My run program as admin is grayed out
0
Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

 
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

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

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

Suggested Solutions

When you try to share a printer , you may receive one of the following error messages. Error message when you use the Add Printer Wizard to share a printer: Windows could not share your printer. Operation could not be completed (Error 0x000006…
A quick guide on how to use Group Policy to create a custom power plan and set it active on Windows 7.
This Micro Tutorial will teach you the basics of configuring your computer to improve its speed. It will also teach you how to disable programs that are running in the background simultaneously. This will be demonstrated using Windows 7 operating…
This Micro Tutorial will give you a introduction in two parts how to utilize Windows Live Movie Maker to its maximum editing capability. This will be demonstrated using Windows Live Movie Maker on Windows 7 operating system.

867 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

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now