Enabling and starting RasMan service from batch file

M

mirin

Hello Experts,

Every time my machine restarts, the RasMan (Remote Access Connection
Manager) Service is disabled as a network security policy.
I cannot change this policy for a single machine.
So I want to write a batch file, scheduled to run at startup, which
will:
1. Set the startup type to Automatic or Manual
2. Start the service

I suppose for #2 I'll need to run the command 'NET START RasMan'.
What command do I need to put in the batch file for #1?

Much appreciate any advice.

Regards,
Mirin
 
D

Dave Patrick

sc config RasMan start= demand

netsvc /start RasMan

http://www.petri.co.il/download_free_reskit_tools.htm


Also
http://technet.microsoft.com/en-us/sysinternals/bb897542.aspx



--

Regards,

Dave Patrick ....Please no email replies - reply in newsgroup.
Microsoft Certified Professional
Microsoft MVP [Windows]
http://www.microsoft.com/protect

"mirin" wrote:
> Hello Experts,
>
> Every time my machine restarts, the RasMan (Remote Access Connection
> Manager) Service is disabled as a network security policy.
> I cannot change this policy for a single machine.
> So I want to write a batch file, scheduled to run at startup, which
> will:
> 1. Set the startup type to Automatic or Manual
> 2. Start the service
>
> I suppose for #2 I'll need to run the command 'NET START RasMan'.
> What command do I need to put in the batch file for #1?
>
> Much appreciate any advice.
>
> Regards,
> Mirin
 
J

John John (MVP)

With NT 4.0 I'm not sure that there is an installed tool to do this.
The start type for the service is held in the Start value at:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\RasMan

Start values are:

0x0 (Boot)
0x1 (System)
0x2 (Automatic)
0x3 (Manual)
0x4 (Disabled)

You could use a registry file or the Resource Kit's Reg.exe to change
the value to suit but I don't think this is the best way to do this, try
it and see.

The prefered way of doing this would be by using the SC.exe tool from
the Resource Kit.

John


You could

mirin wrote:
> Hello Experts,
>
> Every time my machine restarts, the RasMan (Remote Access Connection
> Manager) Service is disabled as a network security policy.
> I cannot change this policy for a single machine.
> So I want to write a batch file, scheduled to run at startup, which
> will:
> 1. Set the startup type to Automatic or Manual
> 2. Start the service
>
> I suppose for #2 I'll need to run the command 'NET START RasMan'.
> What command do I need to put in the batch file for #1?
>
> Much appreciate any advice.
>
> Regards,
> Mirin
 
M

mirin

On May 26, 11:24 pm, "John John (MVP)" <audetw...@nbnet.nb.ca> wrote:
> With NT 4.0 I'm not sure that there is an installed tool to do this.
> The start type for the service is held in the Start value at:
>
> HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\RasMan
>
> Start values are:
>
> 0x0 (Boot)
> 0x1 (System)
> 0x2 (Automatic)
> 0x3 (Manual)
> 0x4 (Disabled)
>
> You could use a registry file or the Resource Kit's Reg.exe to change
> the value to suit but I don't think this is the best way to do this, try
> it and see.
>
> The prefered way of doing this would be by using the SC.exe tool from
> the Resource Kit.
>
> John
>
> You could
>
>
>
>
>
> mirin wrote:
> > Hello Experts,

>
> > Every time my machine restarts, the RasMan (Remote Access Connection
> > Manager) Service is disabled as a network security policy.
> > I cannot change this policy for a single machine.
> > So I want to write a batch file, scheduled to run at startup, which
> > will:
> > 1. Set the startup type to Automatic or Manual
> > 2. Start the service

>
> > I suppose for #2 I'll need to run the command 'NET START RasMan'.
> > What command do I need to put in the batch file for #1?

>
> > Much appreciate any advice.

>
> > Regards,
> > Mirin


Dave/John,

Thanks a lot for your advice.
I could achieve the task with the sc.exe tool.

Many Thanks!
Mirin
 
J

John John (MVP)

mirin wrote:


> Dave/John,
>
> Thanks a lot for your advice.
> I could achieve the task with the sc.exe tool.
>
> Many Thanks!
> Mirin


You're welcome.

John
 
Back
Top Bottom