recently I was looking for the "official" way to have MSMQ running on the
target PCs that will execute .NET applications using MSMQ messaging.
Surprisingly, our installation tool of choice (InstallShield 12) does not
offer a simple option to have this prerequisite covered.
Searching the web I found out that one solution for the task is to run the
Windows System Component Manager (sysocmgr.exe) automatically during the
setup with handing over an instruction file that contains some directives,
eliminating the need for user interaction.
My next idea was to create a single batch file that contains the
sysocmgr.exe command line call as well as the mentioned component
directives. After some testing, my batch file resulted in the following
contents:
;@ECHO OFF
;sysocmgr.exe /i:sysoc.inf /u:MSMQsetup.bat
;GOTO Finished
[Components]
msmq_Core = ON
msmq_LocalStorage = ON
msmq_ADIntegrated = ON
msmq_TriggersService = ON
msmq_HTTPSupport = OFF
msmq_RoutingSupport = OFF
msmq_MQDSService = OFF
;:Finished
If you save the 14 lines above as a file named 'MSMQsetup.bat', a double
click on it will install MSMQ immediately (tailored to our needs with MSMQ
running in workgroup mode). A neat trick is that a semicolon ; is treated
like a blank space by cmd.exe and does not affect the command lines whilst
it suitably marks them as comments for sysocmgr.exe!
The batch file is to be included in the InstallShield setup project to
trigger the required MSMQ installation and I want to be sure that I did not
disregard anything. So I'd appreciate to get your opinion on the chosen way
to install MSMQ - maybe you want to try it on a MSMQ-free machine yourself,
or tell me how you'd do it a different/better way?
Thanks for your assistance,
greetings
Hans
Do you have any more neat ideas like this?
Cheers
John Breakwell
"Hans-Jürgen Philippi" <HJPhi...@aol.com> wrote in message
news:Ovg$eiksH...@TK2MSFTNGP02.phx.gbl...
"John Breakwell (MSFT)" <NoS...@Microsoft.com> wrote:
>
>I love it!
>
> http://blogs.msdn.com/johnbreakwell/archive/2007/06/19/minimalist-setup-script-for-msmq-unattended-installation.aspx
>
> Do you have any more neat ideas like this?
To be honest: Actually I thought I may not see the "setup forest" for the
trees and this batch file was a rather lame trick to do the installation
job - that's why I posted it here.
The more I feel honoured to get mentioned in your blog! :-)
Greetings + thanks for the feedback,
Hans
I have some feedback from the product group: "Ha, that’s pretty
interesting." :-)
They went on to add that for MSMQ 4.0 you will need to re-engineer your
solution.
The sysocmgr tool is only a pre-Vista/2008 tool. For Vista/2008, you must
use either pkgmgr or ocsetup, as those are the tools that replaced sysocmgr.
The OCSetup unattend files are XML, not INI, so the only way to do a similar
trick with OCSetup would be to echo out the XML file from inside the batch
file, and clean up afterward.
Cheers
John
--
http://blogs.msdn.com/johnbreakwell
Greetings,
Hans
"John Breakwell" <JohnBr...@discussions.microsoft.com> schrieb im
Newsbeitrag news:326404D1-633C-48CE...@microsoft.com...
First, thanks a lot for the excellent setup batch file. One question from my
side: How can I define a private queue?
Cheers
Paul
How about something like:
Option Explicit
Dim qpath, qinfo
qpath = ".\private$\test"
set qinfo = CreateObject("MSMQ.MSMQQueueInfo")
qinfo.pathname = qpath
qinfo.Label = "My Test Queue"
qinfo.Create
Set qinfo = nothing
Cheers
John Breakwell
"Paul" <Pa...@discussions.microsoft.com> wrote in message
news:160C3827-4820-4A19...@microsoft.com...
One gotcha to look out for is that by default MSMQ security allows
anyone to send messages to the queue but only allows the creator of the
queue to read messages from the queue. That can become a problem if the
installation process executes under an identity separate from the one
used by the consumer of messages.
The MSMQQueueInfo.Create function does allow you to create a queue that
can be read by anyone by setting the IsWorldReadable parameter to true
but that may grant more access to the queue than you really want to
offer. You can set the queue's security descriptor programmatically but
that either requires coding in C++ to create a SID with the desired
values and then calling MQSetQueueSecurity or coding in a .NET language
and using MessageQueue.SetPermissions
Notes:
1 It's not supported :-)
2 The security SIDs on the original machine need to be available on the new
machines so good for domain accounts
3 This only scales well if the queue name is going to be the same on every
new machine
4 Only works for private queues
174307 Interpreting file names in the Storage directory in Microsoft Message
Queue Server and in Microsoft Message Queuing
http://support.microsoft.com/default.aspx?scid=kb;EN-US;174307
"Files in the Msmq\Storage\Lqs directory"
Cheers
John Breakwell
"Frank Boyne" <frank...@unisys.com> wrote in message
news:ureS2jjy...@TK2MSFTNGP06.phx.gbl...
I tried this on a Windows XP Pro SP2 system but it displays the error
message "The application could not be initialized?" and fails to install MSMQ.
I'm guessing that there is something not setup properly in XP in order to
use this.
What (if any) are the requirements that you must meet before using this?
Please note that:
- The computer is in a workgroup
- The user that is currently logged in is a member of the local
Administrators group.
Thanks,
Mike
"MikeH" <Mi...@discussions.microsoft.com> schrieb:
>
> I tried this on a Windows XP Pro SP2 system but it displays the error
> message "The application could not be initialized?" and fails to install
> MSMQ.
Can you tell "who" is generating the message? Is it the sysocmgr.exe (System
Component Manager) who should carry out the installation?
Just an idea: Maybe the MSMQ setup files are missing on the target machine
and you have to insert the Windows XP Setup CD or SP2 CD.
I was running the batch file under a comparable environment (XP SP2
workgroup) several times on different machines - no props at all.
Greetings,
Hans
This is just a guess but, did you remember to change msmq_ADIntegrated
to be "OFF"?
The title in the error Window is "Windows XP Setup". SYSOCMGR.EXE does show
up as a process in the "Processes" tab of Task Manager and there is an
application named "Windows XP Setup" in the Applications tab.
I was able to install MSMQ using the Add/Remove programs applet and it did
not prompt for the XP CD. So I have to assume that all the required files
are on the system.
I did have the msmq_ADIntegrated option set to ON initially but I turned it
OFF in the option file and still got the same result when I tried it again.
Thanks,
Mike
I setup a test XP system on Virtual Server and ran the original
MSMQSetup.bat contents "by hand" using a command window and the command
line "sysocmgr.exe /i:sysoc.inf /u:MSMQsetup.bat". The setup seemed to
run okay but MSMQ was _not_ installed. I think the problem was that
msmq_ADIntegrated was turned ON but my test system was not part of a
Domain.
Then I changed msmq_ADInrtegrated to OFF and repeated the command.
Again, everything seemed to run okay and this time MSMQ _was_ installed.
I didn't suffer from the problems you describe in either case.
The closest KB article I could find to your symptoms is this (fairly
old) one: http://support.microsoft.com/kb/200391. The gist of the
article seems to be that a version of sysocmgr was incompatible with a
setup program resulting in the error message you are seeing. You might
take a look at the version of sysocmgr that's on your system and perhaps
verify it against the File Version Information Center
http://support.microsoft.com/dllhelp/ (set search to "By File Only" and
enter sysocmgr.exe to get a list of shipped versions of sysocmgr).
The only other diagnostic I can suggest would be to download the process
Monitor from the SysInternals page and use it to monitor everything in
sight while sysocmgr.exe runs. There's some possibility that a
registry, file or process error recorded by Process Monitor might
provide some clue about the application failing to initialize.
http://www.microsoft.com/technet/sysinternals/default.mspx
> Then I changed msmq_ADInrtegrated to OFF and repeated the command. Again,
> everything seemed to run okay and this time MSMQ _was_ installed.
According to
http://technet2.microsoft.com/windowsserver/en/library/578f672d-5b94-4ae6-97d3-2d205eb1206d1033.mspx
it shouldn't matter if msmq_ADIntegrated is set to ON or OFF in a workgroup
environment, since it is irrelevant to the MSMQ operation in this case.
Although, what you've seen indicates something different.
From my experience with a couple of MSMQ setups I'd rather assume that the
described error ("The application could not be initialized") is not related
to the MSMQ setup parameters but to some malfuntion in the executing
installation environment - like you've suggested with the KB article, a
sysocmgr.exe or related DLL version mismatch or something like this. Hard to
locate, though. :-/
One final (naive) question to Mike: All other programs closed and virus
scanners deactivated during setup...?
Greetings,
Hans
I agree. I was expecting MSMQ to just install so I was quite surprised.
Of course we only have one data point here - it could be that I was
doing something stupid.
> From my experience with a couple of MSMQ setups I'd rather assume that
> the described error ("The application could not be initialized") is
> not related to the MSMQ setup parameters but to some malfuntion in the
> executing installation environment
I'm sure you're right.
<whine>
I find it tremendously frustrating when software conceals the data
needed to diagnose a problem and effect a repair or workaround.
Somewhere down in the guts to MSMQ Setup or sysocmgr or something
there's an error code that tells us exactly what went wrong -- file not
found, security prevented access, whatever -- and data that tells us
what the error code applies to -- the name of a file or registry key or
whatever. report (or log) that information and we wouldn;t need to be
speculating as to why the "application failed to initialize".
</whine>
This is such a great tool to configure MSMQ. However, just like MikeH, I
also encoutered this problem when executing this batch file through .NET
Process.Start(@"C:\MSMQsetup.bat"); // The application could not be
initialized.
I also included this file as part of an InstallShield project and whenever I
execute the batch file, the same error occurs. On the other hand, manually
double-clicking the batch file doesn't raise the error and successfully
configures MSMQ.
What could be the problem here? Are there any flags in sysocmgr.exe that we
can use to suppress this error?