Solved

batch file

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

 

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-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

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.
OfficeMate Freezes on login or does not load after login credentials are input.
This Micro Tutorial will give you basic overview of the control panel section on Windows 7. It will depth in Network and Internet, Hardware and Sound, etc. This will be demonstrated using Windows 7 operating system.
The viewer will learn how to successfully create a multiboot device using the SARDU utility on Windows 7. Start the SARDU utility: Change the image directory to wherever you store your ISOs, this will prevent you from having 2 copies of an ISO wit…

840 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