472,783 Members | 961 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,783 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 6006

"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: Rina0 | last post by:
Cybersecurity engineering is a specialized field that focuses on the design, development, and implementation of systems, processes, and technologies that protect against cyber threats and...
3
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 2 August 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
linyimin
by: linyimin | last post by:
Spring Startup Analyzer generates an interactive Spring application startup report that lets you understand what contributes to the application startup time and helps to optimize it. Support for...
0
by: erikbower65 | last post by:
Here's a concise step-by-step guide for manually installing IntelliJ IDEA: 1. Download: Visit the official JetBrains website and download the IntelliJ IDEA Community or Ultimate edition based on...
0
by: Taofi | last post by:
I try to insert a new record but the error message says the number of query names and destination fields are not the same This are my field names ID, Budgeted, Actual, Status and Differences ...
14
DJRhino1175
by: DJRhino1175 | last post by:
When I run this code I get an error, its Run-time error# 424 Object required...This is my first attempt at doing something like this. I test the entire code and it worked until I added this - If...
0
by: Rina0 | last post by:
I am looking for a Python code to find the longest common subsequence of two strings. I found this blog post that describes the length of longest common subsequence problem and provides a solution in...
5
by: DJRhino | last post by:
Private Sub CboDrawingID_BeforeUpdate(Cancel As Integer) If = 310029923 Or 310030138 Or 310030152 Or 310030346 Or 310030348 Or _ 310030356 Or 310030359 Or 310030362 Or...
0
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{

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.