Installing 32Bit Windows Service on 64Bit with ManagedInstallerClass.InstallHelper
-
Wednesday, September 12, 2012 9:45 PM
Is there any way to force ManagedInstallerClass.InstallHelper to use 32Bit. I have a Windows Service compiled for x86 only and I'm trying to use an application built for x64 and ManagedInstallerClass.InstallHelper to install the Service. Is this possible?
Thanks,
Ken
Ken
All Replies
-
Friday, September 14, 2012 3:05 AMModerator
Hi Ken Alexander,
Welcome to MSDN Forum Support.
We're doing research on this issue. It might take some time before we get back to you.
Sincerely,
Jason Wang
Jason Wang [MSFT]
MSDN Community Support | Feedback to us
-
Friday, September 14, 2012 6:47 AMModerator
Hi Ken,
Do you get any exception when installing the 32bit Windows service programatically on 64bit system? I don't think it's a problem.
Good day!
Thanks
Michael Sun [MSFT]
MSDN Community Support | Feedback to us
-
Friday, September 14, 2012 4:07 PM
Hi Michael,
Yes.
Exception occurred while initializing the installation: System.BadImageFormatException. An attempt was made to load a program with an incorrect format.
Ken
-
Monday, September 17, 2012 6:17 AMModerator
Hi Ken,
I am afraid we cannot let ManagedInstallerClass.InstallHelper be executed in 64bit app to install a 32bit service. Could you please consider using a 32bit app to install the service instead?
Good day!
Thanks
Michael Sun [MSFT]
MSDN Community Support | Feedback to us
- Marked As Answer by Ken Alexander Monday, September 17, 2012 3:10 PM
-
Monday, September 17, 2012 3:10 PM
Michael,
Thanks for the confirmation. I cannot use a 32bit app to install the service. I will add command line arguments to the Service (/i /u) and launch the Service exe with the Process class.
Thanks,
Ken
Ken

