Install Msmq using C#
Asked Answered
K

1

7

I am creating an installer for an Application that requires MSMQ to be installed, so if MSMQ is not installed, I need to install the msmq. So can MSMQ be installed using C# or any command??

I am using .net 4.0.

Thanks in advance

Kibosh answered 13/7, 2011 at 12:43 Comment(2)
What is your target platform?Freehanded
windows XP, windows 7, windows server 2003 & 2008Kibosh
H
0

Can you try to launch a sub-process with:

using (Process process = new Process())
{
 process.StartInfo.FileName = Environment.GetFolderPath(Environment.SpecialFolder.System) + "\\" + "pkgmgr.exe";
 process.StartInfo.Arguments = "/iu:MSMQ-Container;MSMQ-Server";
 process.StartInfo.CreateNoWindow = true;
 process.StartInfo.ErrorDialog = true;
 process.StartInfo.UseShellExecute = false;
 process.Start();
 process.WaitForExit();
}
Hydrotherapeutics answered 28/4, 2023 at 19:6 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.