473,387 Members | 1,573 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

writing to the 32-bit registry from a 64-bit application (that darn WOW6432Node)

I need to write to the 32-bit registry, and need to do so from a 64-bit MSI.
It never occurred to me that this would be difficult...

I have an application that installs some 64-bit binaries for development use
in Visual Studio 2005. As such I want them to appear in the .Net References
menu when someone attempts to "Add References" to their project.

Doing this means (normally) writing to the registry key:

HKLM\Software\Microsoft\.NetFramework\v2.0.50727\A ssemblyFoldersEx\MyNewBinaries,
with a default string value of C:\Program Files\MyBinaries.

However, since this is a 64-bit installer, and Visual Studio 2005 is only
32-bit, the actual registry key I want to install is:

HKLM\Software\WOW6432Node\Microsoft\.NetFramework\ v2.0.50727\AssemblyFoldersEx\MyNewBinaries,
with a default string value of C:\Program Files\MyBinaries.

All of which seems simple enough. However, when I run the installer, the
registry key is installed in the 64-bit location instead of the explicitly
specified 32-bit.

If I log verbose output from the msiexec.exe, it thinks it installed the key
in WOW6432Node. However, the result is in the normal Software node. I
realize that 32-bit installers see only the WOW6432Node as the normal node,
but it was my understanding that a 64-bit installer would have access to the
entire registry. Instead it seems to translate a write to the WOW6432Node
as a write to the normal Software node. I posted the project to the web so
you can see of yourselves. Any help would be appreciated.

http://www.coversant.com/downloads/S...roj.RENAME.txt

(that's really a standard vdproj file, but I'm too lazy to add in the
extensions to IIS, so I just renamed it).

I can write an installer class to work around this issue, but I was
wondering if there was a more direct solution.

--
Chris Mullins, MCSD.NET, MCPD:Enterprise
http://www.coversant.net/blogs/cmullins
Nov 3 '06 #1
1 6069

"Chris Mullins" <cm******@yahoo.comwrote in message
news:%2****************@TK2MSFTNGP02.phx.gbl...
>I need to write to the 32-bit registry, and need to do so from a 64-bit
MSI. It never occurred to me that this would be difficult...

I have an application that installs some 64-bit binaries for development
use
in Visual Studio 2005. As such I want them to appear in the .Net
References
menu when someone attempts to "Add References" to their project.

Doing this means (normally) writing to the registry key:

HKLM\Software\Microsoft\.NetFramework\v2.0.50727\A ssemblyFoldersEx\MyNewBinaries,
with a default string value of C:\Program Files\MyBinaries.

However, since this is a 64-bit installer, and Visual Studio 2005 is only
32-bit, the actual registry key I want to install is:

HKLM\Software\WOW6432Node\Microsoft\.NetFramework\ v2.0.50727\AssemblyFoldersEx\MyNewBinaries,
with a default string value of C:\Program Files\MyBinaries.

All of which seems simple enough. However, when I run the installer, the
registry key is installed in the 64-bit location instead of the explicitly
specified 32-bit.

If I log verbose output from the msiexec.exe, it thinks it installed the
key
in WOW6432Node. However, the result is in the normal Software node. I
realize that 32-bit installers see only the WOW6432Node as the normal
node,
but it was my understanding that a 64-bit installer would have access to
the
entire registry. Instead it seems to translate a write to the WOW6432Node
as a write to the normal Software node. I posted the project to the web
so
you can see of yourselves. Any help would be appreciated.

http://www.coversant.com/downloads/S...roj.RENAME.txt

(that's really a standard vdproj file, but I'm too lazy to add in the
extensions to IIS, so I just renamed it).

I can write an installer class to work around this issue, but I was
wondering if there was a more direct solution.

--
Chris Mullins, MCSD.NET, MCPD:Enterprise
http://www.coversant.net/blogs/cmullins
This is strictly MSI related. Follow-up in microsoft.public.windows.msi.
Nov 4 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

48
by: Joseph | last post by:
Hi I'm writing a commercial program which must be reliable. It has to do some basic reading and writing to and from files on the hard disk, and also to a floppy. I have foreseen a potential...
7
by: iz0nlee | last post by:
is it possible to write text into a page or does the whole page have to be re written using Document.Write? I'm an absolute beginner and wanted to add lines of text when a button is clicked. the...
2
by: Bob Quintal | last post by:
Given the requirement of writing data to a binary file padded with null characters to the field boundaries, is there a better way than With rsMembres Do Until .EOF mrubid = !rubID Put #2, ,...
6
by: Wes | last post by:
I'm running FreeBSD 6.1 RELEASE #2. The program is writting in C++. The idea of the program is to open one file as input, read bytes from it, do some bitwise operations on the bytes, and then...
6
by: bonk | last post by:
I am trying to create a stream that writes text to a file and: - automatically creates a new file once the current file exceeds a certain size - makes it possible to be used by multiple threads...
2
by: totoro2468 | last post by:
Here is my code and output. Why is it writing to the array incorrectly, when I rewinded the file to the beginning? CODE: void ReadString (char *filename, int *lengthPtr) { FILE *ifp; char...
5
by: gnanapoongothai | last post by:
hi, i am doing socket programming , and once socket is connected getting data from client and wrting into the file. the file is created but nothing is in it? whats up ? code: WORD...
6
by: docbook.xml | last post by:
I have the following in the XHTML 1.0 Strict page: <meta http-equiv="Content-Type" content="text/html;charset=utf-32" /> However W3 validator complains that "The character encoding specified in...
1
by: Venkat143 | last post by:
Hi, my present o/p in a text file is: 0,time,t,,,,,,,1,w,w,,.......2,e,rt,y,,,,,,,,3,y,u,i,7.54,g,.........32,r,a,q,........7040,u.... desired o/p is: 0,time,t,,,,,,, 32items 1,w,w,,..........
16
by: wizard | last post by:
Here is a piece of code below for writing and reading blobs in SQLITE database. I ' ve a problem to read from blob struct called 'Points' Any help would be appreciated Reagards Greg ...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.