|
| |
|
|
JemperLynn
Posts: 173 Joined: 1/11/2002 From: Texas Status: offline
|
How to write a batch file - 12/2/2002 16:14:11
Okay, I know this may not be the best place to ask this question but I thought I would try.... I need to write a batch file that would stop and start a service on my server. Could someone show me how to do this or give me a website that will explain batch files to me. Don' t tell me to ask my server administrator... I have to figure this out myself. The service is for a program my site connects to. Help me PLEASE!!!!!!!!!
_____________________________
It is the mark of an educated man to be able to fully entertain an idea without accepting it.
|
|
|
|
Gil
Posts: 7533 From: North Carolina, USA Status: offline
|
RE: How to write a batch file - 12/2/2002 16:43:14
If you just need to start and stop a service you could probably use a cron job - assuming a Unix server (beats me using a Windoze server). If you are on Unix see: http://www.unixgeeks.org/security/newbie/unix/cron-1.html
_____________________________
Gil Harvey, 1947-2004
|
|
|
|
Doug G
Posts: 1189 Joined: 12/29/2001 From: SoCal Status: offline
|
RE: How to write a batch file - 12/3/2002 0:07:12
net start service or net stop service in a .bat file. You can use the AT scheduler if you wish. You can find all the batch file commands in windows help on the server. search for batch or command to find the list of available batch file commands. If your server is W2K or if you have Windows Scripting Host installed you can use scripting to perform complicated batch operations.
_____________________________
====== Doug G ======
|
|
|
|
Doug G
Posts: 1189 Joined: 12/29/2001 From: SoCal Status: offline
|
RE: How to write a batch file - 12/3/2002 0:09:01
And regardless of other posts here, the name of the Microsoft operating system is " Windows" :)
_____________________________
====== Doug G ======
|
|
|
|
JemperLynn
Posts: 173 Joined: 1/11/2002 From: Texas Status: offline
|
RE: How to write a batch file - 12/3/2002 10:38:12
Would these commands do what I need to do? net svc " complete name of service" \\xxx /stop net svc " complete name of service" \\xxx /start where xxx is the name of the machine the service is located on in the network thanks guys Jemper
< Message edited by JemperLynn -- 12/3/2002 10:39:32 AM >
|
|
|
|
Doug G
Posts: 1189 Joined: 12/29/2001 From: SoCal Status: offline
|
RE: How to write a batch file - 12/3/2002 16:34:43
I haven' t controlled services on different machines on the network, but I believe you' re on the right track. I know there are some 3rd party applications to make this job easier. Sorry I don' t have any specifics for you though :)
_____________________________
====== Doug G ======
|
|
|
|
JemperLynn
Posts: 173 Joined: 1/11/2002 From: Texas Status: offline
|
RE: How to write a batch file - 12/4/2002 10:58:28
Thanks for your reply guys! I tried out the lines in my last post and they worked. I found out that you can only use the net start commeand if you are starting a service on that machine otherwise you have to tell the computer the where to find the service first, then tell it what to do. Jemper
|
|
New Messages |
No New Messages |
Hot Topic w/ New Messages |
Hot Topic w/o New Messages |
Locked w/ New Messages |
Locked w/o New Messages |
|
Post New Thread
Reply to Message
Post New Poll
Submit Vote
Delete My Own Post
Delete My Own Thread
Rate Posts
|
|
|