0

I am trying to import registry keys along with my application installation using powershell. I am using below command to import registry values (which is placed in a file RegFileName)

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

My expectation is that these registry values should get imported at below path : HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\

But it is getting imported at below path : HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\WOW6432Node\

Above behavior is happening for windows server 2016 operating system, whereas on windows server 2008R2 and windows server 2012 OS it is importing to "HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\" which is expected for application.

But on windows server 2016 OS, there is another WOW6432Node node present under WOW6432Node.

How I can modify my powershell so that it will import registry settings at "HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\" instead of "HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\WOW6432Node\" on windows server 2016 OS.

3
  • 1
    Looks like on 2016 the last part is added by default. Why not remove it from your import path ? Commented Dec 24, 2019 at 8:18
  • Thanks for the workaround. It worked for me. Commented Dec 24, 2019 at 10:54
  • 1
    You shouldn't ever be specifying WOW6432Node as part of a registry path. Use /reg:32 if you need to import into the 32-bit registry. Commented Dec 25, 2019 at 4:16

0

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.