How to insert registry entries from a .reg file into 32-bit registry on 64-bit Windows

12

3

In 64-bit Windows (Vista/7), there's HKLM\Software\Wow6432Node where all the 32-bit registry stuff is. If I have a .reg file with some keys in it, how can I tell regedit to import it into the 32-bit registry (under Wow6432Node) rather than the 64-bit registry?

Even if I put the Wow6432 path into the registry keys in the .reg file, Windows "cleverly" ignores them and puts them in the main 64-bit registry.

GaryO

Posted 2010-03-31T16:16:32.867

Reputation: 265

Shame there's no apparent way to do this in the file itself as we won't always have control over how it's imported. – Deanna – 2016-05-11T13:39:19.233

Don't use regedit for this. The reg command would have accepted your patch. But (maybe only meanwhile) actions like import and export across the 64-bit/32-bit boundary are well supported by the 64-bit reg tool. Please have a look on my answer.

– Wolf – 2017-01-12T10:06:20.687

Answers

13

You should be able to access the 32-bit registry exclusively using the 32 bit version of regedit. Just import your .reg files using:

\Windows\syswow64\regedit.exe <REG_FILE.reg>

heavyd

Posted 2010-03-31T16:16:32.867

Reputation: 54 755

I think that's much easier now.

– Wolf – 2017-01-12T09:13:55.710

14

If you're using reg import yourfile.reg from a 32 bit executable or a batch file, and for some crazy reason you want the keys inside yourfile.reg to NOT be redirected to Wow6432Node, simply use the following syntax:

reg import yourfile.reg /reg:64

As easy as that.

kmort

Posted 2010-03-31T16:16:32.867

Reputation: 1 609

I think this does not answer the actual question. Why not put the real answer first, adding the given supplement information later (or, even better, as a footnote)? – Wolf – 2015-08-25T14:10:48.900

5

The reg tool installed with the 64-bit version of Windows is aware of the registry virtualization technique. It has two new switches: /reg:32 and /reg:64. If you want to apply a registry export from a 32-bit system to a 64-bit system, use the following command line:

reg import <CONF-APP-32.reg> /reg:32

The reg tool has a command line help that explains this in a very short form via reg import /?.

...you will find this also online (though a bit hard to google) for example:

Wolf

Posted 2010-03-31T16:16:32.867

Reputation: 282

0

I have used below powershell commands to achieve it :

$RegFileName = ($_.RegFileName).trim()

reg import ".\$RegFileName" /reg:32

Upendra Gughane

Posted 2010-03-31T16:16:32.867

Reputation: 101