service auto start

R

Roger Levy

I used reg rather than regedit since my target only has command line
capabilities. Here are the registry entries associated with my service on XPe.

HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\ipService
Start REG_DWORD 0x3
Type REG_DWORD 0x10
ErrorControl REG_DWORD 0x1
ImagePath REG_EXPAND_SZ C:\ipService\ipService.exe

HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\ipService\Enum
0 REG_SZ Root\LEGACY_IPSERVICE\0000
Count REG_DWORD 0x1
NextInstance REG_DWORD 0x1

Now here are the registry entries from XP-Pro where the identical service code
starts and works correctly.

HKEY_LOCAL_MACHINE\system\controlset001\services\ipService
Type REG_DWORD 0x10
Start REG_DWORD 0x3
ErrorControl REG_DWORD 0x1
ImagePath REG_EXPAND_SZ c:\ipService\ipService.exe
DisplayName REG_SZ sample service
ObjectName REG_SZ LocalSystem

Comments: I'm using the true name "ipService" in this message rather than
"myService" which I invented to make previous messages more clear. I changed
the start type to 3 for the XPe machine to match what I had in the XP-Pro
machine. Nonetheless a "sc start ipService" command returns a FAILED 2 message
and says the system cannot find the file. I don't know nearly enough about
services and registry contents to know why the XPe and XP-Pro registry entries
are not identical but it seems to me that whatever data appears is correct and
consistent for both machines.

Since this problem seems to have stumped the group and I think it's a
significant one maybe it's time for some folks from MS to toss in some ideas?

Roger Levy
 
S

Slobodan Brcin

Sorry,

Paths are ok.

You can make larger build for testing.
Have you tried to use kernel debugger to see if it even try to start.
Use Dependency Walker to see if there are some static dependencies in your
service.
Try adding DisplayName, ObjectName mannualy.

Or even better, don't install service trough FBA.
But use your install app to install service, like you do on XP.
Check Windows directory and see if there is something in log files. (If they
are not disabled in your build).

If nothing helps.

Then create new thread because this one is too long.

Regards,
Slobodan
 
R

Roger Levy

I disabled my service component in my target configuration. After FBA sealing,
I restarted the system and manually added the service .exe and directory using
the same names and paths I used in the service data for the component. Then I
resealed and deployed. After boot up on a target machine I installed the
service with my install app and started it manually and everything worked.
Since nobody has been able to find anything that I did wrong when I designed the
service into the configuration as a component I have to assume that CD or TD has
a bug although I'd love to be told otherwise by someone who sees what may be
wrong. Is there a way I can get the attention of MS and report this? I won't
be able to move forward until I get this problem resolved because I can't afford
60 little men (or women) to do the manual operations for each machine that I
must deploy.

Roger Levy
 
S

Slobodan Brcin

You said that you make it work on XPE.
Then you have few completely different options for making component in CD.

One method is what you tried and failed.
Second is to use FBA to start your install app at some phase.

Third that is used on drivers and services that you didn't write, and you
don't want to know how they work.
Use tools like regmon, filemon, etc, to see what registry entries are
written during the install, then import those registry entries in component
you are making. This should not be hard.
For you this should not be hard at all since you already know almost all
fields that are changed in registry during install.

It could be bug(unlikely), but more likely you forgot to add something in
CD, what I don't know. But if you conduct long and detail investigation
using various tools, I'm sure you could find what is missing in registry
that prevents your service to start. (for instance have you looked why
DisplayName, ObjectName are missing? ).

If you find problem that you can't solve, try some other approach that will
avoid that problem. There is always more than one way to solve one problem.

If you find errors in TD, CD, etc, post detailed description of problem and
how to recreate it to this NG.
MS people are reading this NG.

Regards,
Slobodan
 
R

Roger Levy

Slobodan,
You may be correct that through trial and error I can figure out a way to get my
service running automatically. However I believe I used CD and TD according to
instructions and the service was not recognized. Finding another way to solve
the problem and ignoring problems in the straightforward technique will only
mean that others will end up wasting a few weeks as I did. I don't think that's
in anyone's best interest and personally I don't have a lot of time to invent
workarounds. I do think it's time that a MS person helped out here.

I guess this thread is too long so I won't add to it. However I do think that
it contains valid information about a problem that merits some attention from
MS. As of now I still don't have a solution so I guess I'll be forced into
invention mode.

Roger
 
S

Slobodan Brcin

I guess this thread is too long so I won't add to it. However I do think
that
it contains valid information about a problem that merits some attention from
MS. As of now I still don't have a solution so I guess I'll be forced into
invention mode.

In previous post I gave you a workaround that you can apply if less that
half and hour. Componentize your install application.

Slobodan
 
H

Heidi Linda eMVP

Slobodan,
You may be correct that through trial and error I can figure out a way to get
my
service running automatically. However I believe I used CD and TD according
to
instructions and the service was not recognized. Finding another way to
solve
the problem and ignoring problems in the straightforward technique will only
mean that others will end up wasting a few weeks as I did. I don't think
that's
in anyone's best interest and personally I don't have a lot of time to invent
workarounds. I do think it's time that a MS person helped out here.

I guess this thread is too long so I won't add to it. However I do think
that
it contains valid information about a problem that merits some attention from
MS. As of now I still don't have a solution so I guess I'll be forced into
invention mode.
I'm not MS, but I'd be able to have a look at this for you over the next
few days if you send me your files. I may be able to shed some light on
why it's not working, or at least get it working, for you.
 

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