? 2 questions about installing NT services

A

Alec Soroudi

Hi,

I'm trying to install a "Non-Plug and Play Driver" in XP using .BAT
files. I can do it by copying the .SYS file to %systemroot%, and merging a
..REG file that has the required info in

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\*****]
and
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\Root\LEGACY_*****\0000]

The problem is that after doing this I have to reboot for them to take
effect, after which they work flawlessly. I would however, like to not have
to reboot. In other words, I would like to add the driver to the services
database and start it.


### I know I can start the service with NET START *****, but how can I
first install/add it to the services db with a batch file?



### The other question is that the aforementioned .REG file dies when I
try to merge it because the ...\Enum\Root\... key is protected. I can
easily deal with this by allowing Administrator accounts access to it, but
would like an automatic (.BAT file) way of doing it.


Thanks
 
S

Smile Extender

You could use sc.exe utility. With it you can add new services. The tool is
part of WinXP resouce kit, but I believe it's also available on Win2K
resource kit.

c:\>sc create

Creates a service entry in the registry and Service Database.
SYNTAX:
sc create [service name] [binPath= ] <option1> <option2>...
CREATE OPTIONS:
NOTE: The option name includes the equal sign.
type= <own|share|interact|kernel|filesys|rec>
(default = own)
start= <boot|system|auto|demand|disabled>
(default = demand)
error= <normal|severe|critical|ignore>
(default = normal)
binPath= <BinaryPathName>
group= <LoadOrderGroup>
tag= <yes|no>
depend= <Dependencies(separated by / (forward slash))>
obj= <AccountName|ObjectName>
(default = LocalSystem)
DisplayName= <display name>
password= <password>
 
S

Smile Extender

You could use sc.exe utility. With it you can add new services. The tool is
part of WinXP resouce kit, but I believe it's also available on Win2K
resource kit.

c:\>sc create

Creates a service entry in the registry and Service Database.
SYNTAX:
sc create [service name] [binPath= ] <option1> <option2>...
CREATE OPTIONS:
NOTE: The option name includes the equal sign.
type= <own|share|interact|kernel|filesys|rec>
(default = own)
start= <boot|system|auto|demand|disabled>
(default = demand)
error= <normal|severe|critical|ignore>
(default = normal)
binPath= <BinaryPathName>
group= <LoadOrderGroup>
tag= <yes|no>
depend= <Dependencies(separated by / (forward slash))>
obj= <AccountName|ObjectName>
(default = LocalSystem)
DisplayName= <display name>
password= <password>
 
A

Alec Soroudi

Wonderful thanks! It worked like a charm! :)

As for the permission thing, I can do that with REGINI and that works as
well, but with SC I don't need it. :)


Thanks! :D

--
Alec
(e-mail address removed)


L

Smile Extender said:
You could use sc.exe utility. With it you can add new services. The tool is
part of WinXP resouce kit, but I believe it's also available on Win2K
resource kit.

c:\>sc create

Creates a service entry in the registry and Service Database.
SYNTAX:
sc create [service name] [binPath= ] <option1> <option2>...
CREATE OPTIONS:
NOTE: The option name includes the equal sign.
type= <own|share|interact|kernel|filesys|rec>
(default = own)
start= <boot|system|auto|demand|disabled>
(default = demand)
error= <normal|severe|critical|ignore>
(default = normal)
binPath= <BinaryPathName>
group= <LoadOrderGroup>
tag= <yes|no>
depend= <Dependencies(separated by / (forward slash))>
obj= <AccountName|ObjectName>
(default = LocalSystem)
DisplayName= <display name>
password= <password>


Alec Soroudi said:
Hi,

I'm trying to install a "Non-Plug and Play Driver" in XP using .BAT
files. I can do it by copying the .SYS file to %systemroot%, and
merging
a
.REG file that has the required info in

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\*****]
and
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\Root\LEGACY_*****\0000]

The problem is that after doing this I have to reboot for them to take
effect, after which they work flawlessly. I would however, like to not have
to reboot. In other words, I would like to add the driver to the services
database and start it.


### I know I can start the service with NET START *****, but how can I
first install/add it to the services db with a batch file?



### The other question is that the aforementioned .REG file dies when I
try to merge it because the ...\Enum\Root\... key is protected. I can
easily deal with this by allowing Administrator accounts access to it, but
would like an automatic (.BAT file) way of doing it.


Thanks
 
A

Alec Soroudi

Wonderful thanks! It worked like a charm! :)

As for the permission thing, I can do that with REGINI and that works as
well, but with SC I don't need it. :)


Thanks! :D

--
Alec
(e-mail address removed)


L

Smile Extender said:
You could use sc.exe utility. With it you can add new services. The tool is
part of WinXP resouce kit, but I believe it's also available on Win2K
resource kit.

c:\>sc create

Creates a service entry in the registry and Service Database.
SYNTAX:
sc create [service name] [binPath= ] <option1> <option2>...
CREATE OPTIONS:
NOTE: The option name includes the equal sign.
type= <own|share|interact|kernel|filesys|rec>
(default = own)
start= <boot|system|auto|demand|disabled>
(default = demand)
error= <normal|severe|critical|ignore>
(default = normal)
binPath= <BinaryPathName>
group= <LoadOrderGroup>
tag= <yes|no>
depend= <Dependencies(separated by / (forward slash))>
obj= <AccountName|ObjectName>
(default = LocalSystem)
DisplayName= <display name>
password= <password>


Alec Soroudi said:
Hi,

I'm trying to install a "Non-Plug and Play Driver" in XP using .BAT
files. I can do it by copying the .SYS file to %systemroot%, and
merging
a
.REG file that has the required info in

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\*****]
and
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\Root\LEGACY_*****\0000]

The problem is that after doing this I have to reboot for them to take
effect, after which they work flawlessly. I would however, like to not have
to reboot. In other words, I would like to add the driver to the services
database and start it.


### I know I can start the service with NET START *****, but how can I
first install/add it to the services db with a batch file?



### The other question is that the aforementioned .REG file dies when I
try to merge it because the ...\Enum\Root\... key is protected. I can
easily deal with this by allowing Administrator accounts access to it, but
would like an automatic (.BAT file) way of doing it.


Thanks
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top