Solved

Start service using batch file

Posted on 2014-11-25
5
161 Views
Last Modified: 2014-11-26
Running Small Business Server 2008 on ML350 G5 server.
I need to start a service at a certain time each day.  I am not a computer expert.  I have created a batch file which will start the service at 02:00 am.  However, it needs to run as administrator.  Somehow I need to elevate the privilege .  I like my sleep and I don't want to wake up at 02:00 and elevate the batch file .   Someone must have figured out how to do this.

Remember, I am not an expert so please provide detailed instructions on how to raise the privilege so this batch file can run.  Thank you for your help.
0
Comment
Question by:donpick
5 Comments
 
LVL 78

Assisted Solution

by:David Johnson, CD, MVP
David Johnson, CD, MVP earned 157 total points
ID: 40466195
use the task scheduler to start the batch file.
0
 
LVL 23

Accepted Solution

by:
Michael74 earned 167 total points
ID: 40466196
Use windows task scheduler. With this built in tool you can set the time, account to run under and other options.

http://technet.microsoft.com/en-us/library/cc721871.aspx
0
 
LVL 29

Assisted Solution

by:becraig
becraig earned 176 total points
ID: 40466213
Alternatively if there is an absolute requirement for a user name and password you can set this with your scheduled task and set run level RL to highest.


Command line would look like

Schtasks /ru username /rp password /RL highest /tn taskname /tr c:\somefile.bat
0
 
LVL 29

Expert Comment

by:becraig
ID: 40466214
Of course you'd have to edit the command for daily as well as time to run
0
 

Author Closing Comment

by:donpick
ID: 40468382
Thank you all for your prompt response.   I pay for this service so I appreciate prompt responses.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Possible fixes for Windows 7 and Windows Server 2008 updating problem. Solutions mentioned are from Microsoft themselves. I started a case with them from our Microsoft Silver Partner option to open a case and get direct support from Microsoft. If s…
A procedure for exporting installed hotfix details of remote computers using powershell
To efficiently enable the rotation of USB drives for backups, storage pools need to be created. This way no matter which USB drive is installed, the backups will successfully write without any administrative intervention. Multiple USB devices need t…
This tutorial will walk an individual through the steps necessary to join and promote the first Windows Server 2012 domain controller into an Active Directory environment running on Windows Server 2008. Determine the location of the FSMO roles by lo…

896 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

15 Experts available now in Live!

Get 1:1 Help Now