// Another question from Bobby

I found this (http://msdn2.microsoft.com/en-us/library/ms905802.aspx) and
was wondering if I could use the "QueueManagerGUID" and still have it run on
boot?

// Original Answer from John

We force people to call the commands the first time because MSMQ needs to
create a UUID for the machine on 1st use - msmqadm register. If MSMQ tried
to get its UUID the 1st time a device ever booted without user intercaction,
there's the chance (very slight) that if the system clock weren't set already
then we could get the same random # when we call the random # generator since
every clock would be 12:00:05AM, 1/1/08. This way people presumably set the
clock 1st and then msmqdam register.

Now CE's random # generator is better than only relying on current device
time, but the original implementor was paranoid.

You can check out the MSMQADm source code at
\public\servers\sdk\samples\msmq\msmqadm to get a sense of what it's doing.
Basically all this stuff is just registry writes. You could potentially
implement equivalent of this stuff in .Net, probably easier is to have a
boottime program that just does CreateProcess("msmqadm","register",...) on
each command. In theory you could also burn the MSMQ device GUID in at ROM
creation time, though since it's important GUID's are unique each device
would have to have a slightly different img which I imagine is quite hard in
practice to make.

Finally, if you have followups let's take the conversation to
microsoft.public.windowsce.platbuilder newsgroup, copying+pasting what we
have, so the whole community can benefit.

John

// Original Email from Bobby Cannon

I would like any help possible.

I have a project that I am working on that requires MSMQ. I have create a
new Windows CE 6.0 R2 image that includes everything I need (.NET 3.5
Headless, MSMQ, etc...). The problem is that I have to manually start MSMQ
with the following three commands.

msmqadm register
msmqadm enable binary
msmqadm start

Then run my apps. How can I start the image and have MSMQ already running.

Re: Getting MSMQ to run on BOOT by John

John
Fri Mar 21 13:19:37 PDT 2008

Yes, it's ultimately QueueManagerGUID that is what the "msmqadm register"
is setting in the src code below.

One thing to be aware of is that you really need to have the queue guid be
unique or else bad things will happen if you have MSMQ devices with
conflicting GUID's on same network. So if when you are flashing your
devices with this QueueManagerGUID, you couldn't put this into a project.reg
& then burn the same image onto all devices.

If you really want MSMQ to just start at boottime on the 1st time, you could
write a light-weight service in services.exe that is loaded before MSMQ
service starts and then have your service do the random # gen for the GUID
(and other initial setup from MSMQADm source code). Unless there's a
compelling reason though I would recommend using the msmqadm tools or making
your own equivalent calls in a standalone app.

--
John Spaith
Senior Software Design Engineer
Windows CE Networking
Microsoft Corporation

http://blogs.msdn.com/cenet/.

This posting is provided "AS IS" with no warranties, and confers no rights.
You assume all risk for your use. © 2007 Microsoft Corporation. All rights
reserved.

"Bobby Cannon" <Bobby Cannon@discussions.microsoft.com> wrote in message
news:5CDC15DD-8611-4F5E-B789-16708B6A2BBF@microsoft.com...
> // Another question from Bobby
>
> I found this (http://msdn2.microsoft.com/en-us/library/ms905802.aspx) and
> was wondering if I could use the "QueueManagerGUID" and still have it run
> on
> boot?
>
> // Original Answer from John
>
> We force people to call the commands the first time because MSMQ needs to
> create a UUID for the machine on 1st use - msmqadm register. If MSMQ
> tried
> to get its UUID the 1st time a device ever booted without user
> intercaction,
> there's the chance (very slight) that if the system clock weren't set
> already
> then we could get the same random # when we call the random # generator
> since
> every clock would be 12:00:05AM, 1/1/08. This way people presumably set
> the
> clock 1st and then msmqdam register.
>
> Now CE's random # generator is better than only relying on current device
> time, but the original implementor was paranoid.
>
> You can check out the MSMQADm source code at
> \public\servers\sdk\samples\msmq\msmqadm to get a sense of what it's
> doing.
> Basically all this stuff is just registry writes. You could potentially
> implement equivalent of this stuff in .Net, probably easier is to have a
> boottime program that just does CreateProcess("msmqadm","register",...) on
> each command. In theory you could also burn the MSMQ device GUID in at
> ROM
> creation time, though since it's important GUID's are unique each device
> would have to have a slightly different img which I imagine is quite hard
> in
> practice to make.
>
> Finally, if you have followups let's take the conversation to
> microsoft.public.windowsce.platbuilder newsgroup, copying+pasting what we
> have, so the whole community can benefit.
>
> John
>
> // Original Email from Bobby Cannon
>
> I would like any help possible.
>
> I have a project that I am working on that requires MSMQ. I have create a
> new Windows CE 6.0 R2 image that includes everything I need (.NET 3.5
> Headless, MSMQ, etc...). The problem is that I have to manually start MSMQ
> with the following three commands.
>
> msmqadm register
> msmqadm enable binary
> msmqadm start
>
> Then run my apps. How can I start the image and have MSMQ already
> running.
>



Re: Getting MSMQ to run on BOOT by BobbyCannon

BobbyCannon
Mon Mar 24 07:17:01 PDT 2008

This is exactly what I needed to hear! This is what we where thinking but
wanted to verify.

Thanks,
Bobby Cannon

"John Spaith [MS]" wrote:

> Yes, it's ultimately QueueManagerGUID that is what the "msmqadm register"
> is setting in the src code below.
>
> One thing to be aware of is that you really need to have the queue guid be
> unique or else bad things will happen if you have MSMQ devices with
> conflicting GUID's on same network. So if when you are flashing your
> devices with this QueueManagerGUID, you couldn't put this into a project.reg
> & then burn the same image onto all devices.
>
> If you really want MSMQ to just start at boottime on the 1st time, you could
> write a light-weight service in services.exe that is loaded before MSMQ
> service starts and then have your service do the random # gen for the GUID
> (and other initial setup from MSMQADm source code). Unless there's a
> compelling reason though I would recommend using the msmqadm tools or making
> your own equivalent calls in a standalone app.
>
> --
> John Spaith
> Senior Software Design Engineer
> Windows CE Networking
> Microsoft Corporation
>
> http://blogs.msdn.com/cenet/.
>
> This posting is provided "AS IS" with no warranties, and confers no rights.
> You assume all risk for your use. © 2007 Microsoft Corporation. All rights
> reserved.
>
> "Bobby Cannon" <Bobby Cannon@discussions.microsoft.com> wrote in message
> news:5CDC15DD-8611-4F5E-B789-16708B6A2BBF@microsoft.com...
> > // Another question from Bobby
> >
> > I found this (http://msdn2.microsoft.com/en-us/library/ms905802.aspx) and
> > was wondering if I could use the "QueueManagerGUID" and still have it run
> > on
> > boot?
> >
> > // Original Answer from John
> >
> > We force people to call the commands the first time because MSMQ needs to
> > create a UUID for the machine on 1st use - msmqadm register. If MSMQ
> > tried
> > to get its UUID the 1st time a device ever booted without user
> > intercaction,
> > there's the chance (very slight) that if the system clock weren't set
> > already
> > then we could get the same random # when we call the random # generator
> > since
> > every clock would be 12:00:05AM, 1/1/08. This way people presumably set
> > the
> > clock 1st and then msmqdam register.
> >
> > Now CE's random # generator is better than only relying on current device
> > time, but the original implementor was paranoid.
> >
> > You can check out the MSMQADm source code at
> > \public\servers\sdk\samples\msmq\msmqadm to get a sense of what it's
> > doing.
> > Basically all this stuff is just registry writes. You could potentially
> > implement equivalent of this stuff in .Net, probably easier is to have a
> > boottime program that just does CreateProcess("msmqadm","register",...) on
> > each command. In theory you could also burn the MSMQ device GUID in at
> > ROM
> > creation time, though since it's important GUID's are unique each device
> > would have to have a slightly different img which I imagine is quite hard
> > in
> > practice to make.
> >
> > Finally, if you have followups let's take the conversation to
> > microsoft.public.windowsce.platbuilder newsgroup, copying+pasting what we
> > have, so the whole community can benefit.
> >
> > John
> >
> > // Original Email from Bobby Cannon
> >
> > I would like any help possible.
> >
> > I have a project that I am working on that requires MSMQ. I have create a
> > new Windows CE 6.0 R2 image that includes everything I need (.NET 3.5
> > Headless, MSMQ, etc...). The problem is that I have to manually start MSMQ
> > with the following three commands.
> >
> > msmqadm register
> > msmqadm enable binary
> > msmqadm start
> >
> > Then run my apps. How can I start the image and have MSMQ already
> > running.
> >
>
>
>