Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

msmq started after the service depended on it

26 views
Skip to first unread message

jason

unread,
Aug 14, 2006, 7:18:45 PM8/14/06
to
I have a windows service which uses message queue. During installation, I
made my service depended on MSMQ by adding a REG_SZ type value, name
DependOnService, data MSMQ.

Service console shows that my service depends on Message Queue. However, my
service starts before MSMQ. In event log, my service and MSMQ all logged as
start successfully.

This behavior is consistent in my 2 XP workstations, 2 Win2003 servers.
Don't know why. (I remembered it worked a couple of days ago. Now it no
longer works.)

patr...@gmail.com

unread,
Aug 15, 2006, 12:03:27 PM8/15/06
to
Jason,

I have done the same thing. Restarting the machine fixes the problem.
I think the dependencies are pulled out of the registry on startup
only. However when you view properties on a given service it will
report the dependency that you assigned. When I restarted the service
was started correctly. Also, restarting the MSMQ service will show
your service as a dependency and will stop and start the service
appropriately.

-PKS

jason schrieb:

Jason

unread,
Aug 15, 2006, 2:54:44 PM8/15/06
to
The problem I had is during restart. If I manaully start my service, it is
fine because the msmq had already started and running. Why dependancy does
not work for msmq? What other service should be made dependancy?

<patr...@gmail.com> wrote in message
news:1155657807....@75g2000cwc.googlegroups.com...

Dejan Grujic

unread,
Aug 15, 2006, 3:48:46 PM8/15/06
to
Maybe it's problem how you define dependency? In VS.Net 2003 dependency
is not a string but array of strings. In my case that array has single
string "MSMQ" and that's enough to work correctly. I'm sure it works
because MSMQ didn't start at all few times (AD issues) and my services
also did not start.

Dejan
--
Download QueueExplorer, managing utility for MSMQ
http://www.cogin.com

Frank Boyne

unread,
Aug 16, 2006, 1:56:28 PM8/16/06
to
"jason" <a...@a.com> wrote in message
news:%23f14%23f$vGHA...@TK2MSFTNGP05.phx.gbl...

> Service console shows that my service depends on Message Queue. However,
> my service starts before MSMQ. In event log, my service and MSMQ all
> logged as start successfully.

Speculating wildly perhaps some other program that runs during system
initialisation is 'touching' the MSMQ service causing it to be initiated
before the SCM would otherwise start it? Although I would have imagined
that 'touching' a service would involve the SCM so dependencies could still
be enforced.

One thing you might do to diagnose this further is to adjust your Local
Security Policy to turn on Audit Process Tracking. With that turned on,
you'll see a Security Event Log entry for every process create. The Creator
Process Id for that entry will tell you what process actually started the
service (most likely the SCM - services.exe) but you'll also see what other
processes were initiated just before the MSMQ service (mqsvc.exe) was
initiated. That might give you a clue.


Junior

unread,
Aug 17, 2006, 9:53:01 AM8/17/06
to
I believe you should use REG_MULTI_SZ. Hope it helps
0 new messages