Boot Order

Paul

Splendid
Mar 30, 2004
5,267
0
25,780
Archived from groups: microsoft.public.win2000.setup (More info?)

How do I execute a program or command before windows
services are started. I want to copy a configuration file
for one of my services before the service loads.

I have looked into using the autoexec.bat or adding to the
registry entry
[HKEY_LOCAL_MACHINE\SYSTEM\Current
ControlSet\Control\Session Manager\BootExecute

But I haven't been able to figure it out.

Paul
 
G

Guest

Guest
Archived from groups: microsoft.public.win2000.setup (More info?)

Set the service startup to manual then create a shell script that does the
copy then net starts the service. Then use Task Scheduler to run the shell
script at startup.

--
Regards,

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


"Paul" wrote:
| How do I execute a program or command before windows
| services are started. I want to copy a configuration file
| for one of my services before the service loads.
|
| I have looked into using the autoexec.bat or adding to the
| registry entry
| [HKEY_LOCAL_MACHINE\SYSTEM\Current
| ControlSet\Control\Session Manager\BootExecute
|
| But I haven't been able to figure it out.
|
| Paul
 

Paul

Splendid
Mar 30, 2004
5,267
0
25,780
Archived from groups: microsoft.public.win2000.setup (More info?)

Doesn't this mean that the service will then run when the
scripts start rather than earlier when the services
start? I think this will work but if there is an option
to do this without running the service later it would be
better.

Paul

>-----Original Message-----
>Set the service startup to manual then create a shell
script that does the
>copy then net starts the service. Then use Task Scheduler
to run the shell
>script at startup.
>
>--
>Regards,
>
>Dave Patrick ....Please no email replies - reply in
newsgroup.
>Microsoft Certified Professional
>Microsoft MVP [Windows]
>http://www.microsoft.com/protect
>
>
>"Paul" wrote:
>| How do I execute a program or command before windows
>| services are started. I want to copy a configuration
file
>| for one of my services before the service loads.
>|
>| I have looked into using the autoexec.bat or adding to
the
>| registry entry
>| [HKEY_LOCAL_MACHINE\SYSTEM\Current
>| ControlSet\Control\Session Manager\BootExecute
>|
>| But I haven't been able to figure it out.
>|
>| Paul
>
>
>.
>
 
G

Guest

Guest
Archived from groups: microsoft.public.win2000.setup (More info?)

Yes. No idea from here what your timing issues might be.

Another idea is to do it on the other end. This assumes the file is locked
until the service is stopped or you're not done collecting data or whatever.
In other words, in a shutdown script, net stop the service; *then* do the
file copy; *then* the machine shuts down (or restarts whichever the case)
Let me know on this and I can go into a little more detail.

--
Regards,

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


"Paul" wrote:
| Doesn't this mean that the service will then run when the
| scripts start rather than earlier when the services
| start? I think this will work but if there is an option
| to do this without running the service later it would be
| better.
|
| Paul
 
G

Guest

Guest
Archived from groups: microsoft.public.win2000.setup (More info?)

I'll give the details. The service is macro software that
can launch tasks at startup (sort of ironic). The macro
software won't let me specify where its configuration file
is (if it did I could specify it to another drive and
aviod the whole problem) and I use an image of my computer
that I reload often and I want the configuration file to
be update when I re-image. Hope that makes sense.

Paul

>-----Original Message-----
>Yes. No idea from here what your timing issues might be.
>
>Another idea is to do it on the other end. This assumes
the file is locked
>until the service is stopped or you're not done
collecting data or whatever.
>In other words, in a shutdown script, net stop the
service; *then* do the
>file copy; *then* the machine shuts down (or restarts
whichever the case)
>Let me know on this and I can go into a little more
detail.
>
>--
>Regards,
>
>Dave Patrick ....Please no email replies - reply in
newsgroup.
>Microsoft Certified Professional
>Microsoft MVP [Windows]
>http://www.microsoft.com/protect
>
>
>"Paul" wrote:
>| Doesn't this mean that the service will then run when
the
>| scripts start rather than earlier when the services
>| start? I think this will work but if there is an option
>| to do this without running the service later it would be
>| better.
>|
>| Paul
>
>
>.
>
 
G

Guest

Guest
Archived from groups: microsoft.public.win2000.setup (More info?)

Looks like it might be easiest to abandon the macro software. These articles
may also help.

How to Delay Loading of Specific Services
http://support.microsoft.com/default.aspx?kbid=193888



HOWTO: Create a User-Defined Service

http://support.microsoft.com/default.aspx?kbid=137890


--
Regards,

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


<koravas1@hotmail.com> wrote:
| I'll give the details. The service is macro software that
| can launch tasks at startup (sort of ironic). The macro
| software won't let me specify where its configuration file
| is (if it did I could specify it to another drive and
| aviod the whole problem) and I use an image of my computer
| that I reload often and I want the configuration file to
| be update when I re-image. Hope that makes sense.
|
| Paul
 

Paul

Splendid
Mar 30, 2004
5,267
0
25,780
Archived from groups: microsoft.public.win2000.setup (More info?)

That actually seems like a good way of doing it, make a
new service and make the macro service dependent on it.

If I make the copy of a service does that service continue
to run and use memory/cpu cycles when it is done? If so
is it going to be enough to make a difference? I supose I
could make the copy service stop itself after it runs to
avoid wasting resources.

Thanks for all the help,
Paul

>-----Original Message-----
>Looks like it might be easiest to abandon the macro
software. These articles
>may also help.
>
>How to Delay Loading of Specific Services
>http://support.microsoft.com/default.aspx?kbid=193888
>
>
>
>HOWTO: Create a User-Defined Service
>
>http://support.microsoft.com/default.aspx?kbid=137890
>
>
>--
>Regards,
>
>Dave Patrick ....Please no email replies - reply in
newsgroup.
>Microsoft Certified Professional
>Microsoft MVP [Windows]
>http://www.microsoft.com/protect
>
>
><koravas1@hotmail.com> wrote:
>| I'll give the details. The service is macro software
that
>| can launch tasks at startup (sort of ironic). The macro
>| software won't let me specify where its configuration
file
>| is (if it did I could specify it to another drive and
>| aviod the whole problem) and I use an image of my
computer
>| that I reload often and I want the configuration file to
>| be update when I re-image. Hope that makes sense.
>|
>| Paul
>
>
>.
>
 
G

Guest

Guest
Archived from groups: microsoft.public.win2000.setup (More info?)

I wouldn't think that it would consume enough resource to worry about, but
yes you could just have it stop after the copy is complete and the other
service has started..

--
Regards,

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


"Paul" wrote:
| That actually seems like a good way of doing it, make a
| new service and make the macro service dependent on it.
|
| If I make the copy of a service does that service continue
| to run and use memory/cpu cycles when it is done? If so
| is it going to be enough to make a difference? I supose I
| could make the copy service stop itself after it runs to
| avoid wasting resources.
|
| Thanks for all the help,
| Paul