navigation
a webmaster learning community
     Home    Register     Search      Help      Login    
Sponsors

Shopping Cart Software
Ecommerce software integrated into Frontpage, Dreamweaver and Golive templates. No monthly fees and available in ASP and PHP versions.

Website Templates
We also have a wide selection of Dreamweaver, Expression Web and Frontpage templates as well as webmaster tools and CSS layouts.

Frontpage website templates
Creative Website Templates for FrontPage, Dreamweaver, Flash, SwishMax

Search Forums
 

Advanced search
Recent Posts

 Todays Posts
 Most Active posts
 Posts since last visit
 My Recent Posts
 Mark posts read

Microsoft MVP

 

How to write a batch file

 
View related threads: (in this forum | in all forums)

Logged in as: Guest
Users viewing this topic: none
Printable Version 

All Forums >> Web Development >> Server Issues >> How to write a batch file
Page: [1]
 
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

(in reply to JemperLynn)
caywind

 

Posts: 1479
From: USA
Status: offline

 
RE: How to write a batch file - 12/2/2002 22:15:45   
windoze uses the AT command.

here' s some examples:
http://support.microsoft.com/default.aspx?scid=kb;en-us;Q313289&sd=tech

you can type: at /? for help

< Message edited by caywind -- 12/2/2002 10:24:22 PM >

(in reply to Gil)
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
======

(in reply to JemperLynn)
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
======

(in reply to JemperLynn)
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 >

(in reply to JemperLynn)
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
======

(in reply to JemperLynn)
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

(in reply to JemperLynn)
Page:   [1]

All Forums >> Web Development >> Server Issues >> How to write a batch file
Page: [1]
Jump to: 1





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