Re: writing a .bat file helppppp! ~urgent~
- From: "Miha Pihler [MVP]" <mihap-news@xxxxxxxxxxx>
- Date: Sat, 14 May 2005 17:42:50 +0200
Yes. In this case you would use:
net stop "Server"
net start "Server"
I hope this helps,
--
Mike
Microsoft MVP - Windows Security
"maitakeboy" <maitakeboy@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:B70DFB46-031F-4DB6-98B8-F15A7F385382@xxxxxxxxxxxxxxxx
>I have a similar issue. Am I understanding you correctly that you would use
> the Net Stop and Net Start commands even if you are running the batch file
> on
> the server where the service is running? I need to stop and start the
> Server
> service so I can close all open sessions for a utility to run. So would
> Net
> Stop Server do the trick?
>
> "Miha Pihler [MVP]" wrote:
>
>> Hi,
>>
>> I can't give you specific batch file since you didn't which services you
>> need to stop. Still the first batch file would be something like this.
>>
>> net stop "IMAPI CD-Burning COM Service"
>> net stop "Simple Mail Transfer Protocol (SMTP)"
>>
>> if "IMAPI CD-Burning COM Service" and "Simple Mail Transfer Protocol
>> (SMTP)"
>> are the services that you would like to stop.
>>
>> In second batch file you would have:
>>
>> net start "IMAPI CD-Burning COM Service"
>> net start "Simple Mail Transfer Protocol (SMTP)"
>>
>> Create two batch jobs - one for each of the batch files that will run at
>> desired times with appropriate permissions.
>>
>> I hope this helps.
>>
>> --
>> Mike
>> Microsoft MVP - Windows Security
>>
>> "noobtech" <noobtech@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
>> news:9C9CD611-6417-4607-BC21-3F577AF84CA0@xxxxxxxxxxxxxxxx
>> >I have wrote simple batch files before but now i'm stuck and need some
>> >help.
>> > We have 5 services that needs to be shutdown at 2 am in the morning.
>> > There
>> > is
>> > no way around it.
>> >
>> > I need to write a batch file that, without user intervention (batch
>> > file
>> > has
>> > to run on it's own)
>> >
>> > 1.) proceeds to shut down 5 specific services on the server at a
>> > designated
>> > time.
>> > 2.) then after 30 mins proceeds to restart all 5 services (again
>> > without
>> > user intervention)
>> >
>> > How do i do this?
>>
>>
>>
.
- References:
- Re: writing a .bat file helppppp! ~urgent~
- From: maitakeboy
- Re: writing a .bat file helppppp! ~urgent~
- Prev by Date: Re: how to create additional DC (win2003)
- Next by Date: POP3 Service message size limit (Not Exchange)
- Previous by thread: Re: writing a .bat file helppppp! ~urgent~
- Next by thread: w2k3 sp1 issues
- Index(es):
Relevant Pages
|