Hello,
I have a .NET windows service application built on an 32-bit XP Pro system
that I am trying to install on a 64-bit XP Pro system.
This service needs to write in to the HKLM/Software registry key, not the
HKCU key because it is a system extension that is intended for Win2003
deployment.
After install, the registry keys are NOT in the HKLM/Software registry, but
rather in HKLM/Software/Wow6432node. This causes my service to crash because
it is not expecting the keys to be in this "Wow6432node" subkey.
Is there some special way to use the Registry objects in .NET to
automatically know to search in the Wow6432node key??
Thanks
-- Jake

Signature
Jacob W Anderson
---
http://www.beyond-ordinary.com
http://www.extremeplannerlive.com
---
If you think it''''s expensive to hire a professional to do the job, wait
until you hire an amateur.
javatopia - 07 Nov 2007 20:10 GMT
I have worked around this. To make this work, I changed the compatibility
mode on the service's EXE file to be compatible with XP. That seems to have
done the trick.
Is there something I can set in the MSI to make this be automatic??

Signature
Jacob W Anderson
---
http://www.beyond-ordinary.com
http://www.extremeplannerlive.com
---
If you think it''''s expensive to hire a professional to do the job, wait
until you hire an amateur.
> Hello,
>
[quoted text clipped - 15 lines]
>
> -- Jake
javatopia - 07 Nov 2007 22:38 GMT
The story gets better. Eventhough the service can open the registry key, it
still does not get any of the subkey values. Hmm.
In VisualStudio there is a platform target that is set to "ANY" for the .NET
projects. This is incorrect for us now, because we have to either choose x86
or x64, otherwise the registry is not visible to the application.
When I chose x86, the service was finally able to get registry key values
successfully.
I wonder if I have to do the same with the ASP.NET applications....

Signature
Jacob W Anderson
---
http://www.beyond-ordinary.com
http://www.extremeplannerlive.com
---
If you think it''''s expensive to hire a professional to do the job, wait
until you hire an amateur.
> I have worked around this. To make this work, I changed the compatibility
> mode on the service's EXE file to be compatible with XP. That seems to have
[quoted text clipped - 21 lines]
> >
> > -- Jake
Willy Denoyette [MVP] - 08 Nov 2007 10:43 GMT
Note that only Administrators have Write access privileges to HKLM, does
your service runs as a local Administrator?.
Willy.
> Hello,
>
[quoted text clipped - 17 lines]
>
> -- Jake
javatopia - 08 Nov 2007 15:41 GMT
Maybe - it runs as Local System.
Note that on x86, XP Pro, Win2k3, this service works without any alterations
to the security model on the system. Only on the x64 versions of Windows,
whether XP or Vista, does this service need some special handling.

Signature
Jacob W Anderson
---
http://www.beyond-ordinary.com
http://www.extremeplannerlive.com
---
If you think it''''s expensive to hire a professional to do the job, wait
until you hire an amateur.
> Note that only Administrators have Write access privileges to HKLM, does
> your service runs as a local Administrator?.
[quoted text clipped - 22 lines]
> >
> > -- Jake