Jump to content
Strawberry Orange Banana Lime Leaf Slate Sky Blueberry Grape Watermelon Chocolate Marble
Strawberry Orange Banana Lime Leaf Slate Sky Blueberry Grape Watermelon Chocolate Marble

MSFN is made available via donations, subscriptions and advertising revenue. The use of ad-blocking software hurts the site. Please disable ad-blocking software or set an exception for MSFN. Alternatively, register and become a site sponsor/subscriber and ads will be disabled automatically. 


Rhor

Applying REG file on 64 bits Win7 with command line.

Recommended Posts

Greetings.

I have this bunch of REG files that I used to apply on Windows 7 32 bits through command line (regedit.exe /s "file.reg").

Now I had to switch to a 64 bits version of Windows 7, and when I want to apply those REG files, the registry keys do not change.

Is there any special considerations I need to know to apply those REG files on 64 bits Win7 version through command line arguments?

Thank you in advance.

Share this post


Link to post
Share on other sites

Which keys are you checking?

The native 64-bit Registry Editor should be updating the keys directly, the 32-bit WOW64 one would update the keys read by 32-bit apps, under Wow6432Node...

You could try the 32-bit Registry Editor in C:\Windows\SysWOW64 if the values are to be used by 32-bit processes...

Share this post


Link to post
Share on other sites

I'm modifying the usual "HKEY_CURRENT_USER\Software\AnyRandomAPP" keys that stores software configurations.

I have scripts written on a program called "Vtask" that install all my programs silently, and part of those scripts export configuration keys to the registry itself, the script call a .reg file to apply it.

When I double click the .reg file directly, it works of course, but when the Vtask script tries to do it, it doesnt work. So I pressume is some kind of problem with Vtask itself, but I tried many things with no success, that's why I asked if I was ignoring something new with a x64 registry.

I will try to use REGEDIT on "C:\Windows\SysWOW64 " in different ways to see if it works.

Thank you for your comment.

Share this post


Link to post
Share on other sites
When I double click the .reg file directly, it works of course, but when the Vtask script tries to do it, it doesnt work.
Aha, then it's the other way around :)

Double-clicking a .reg file will run the native (x64) Registry Editor and the setting is imported exactly as it appears.

If this Vtask thing is a 32-bit process, then when it calls registry APIs to import the file, it will get redirected to HKEY_CURRENT_USER\SoftwareWow6432Node\AnyRandomAPP.

This is expected behaviour for 32-bit apps running on 64-bit Windows, to allow for backwards compatibility but keeping them distinct (because the assumption is that if a 32-bit process writes the registry value, it is to be read by another 32-bit process).

Using Registry Editor in the SysWOW64 folder will just do the same as Vtask.

Share this post


Link to post
Share on other sites

vTask is compatible with 32 or 64 bit environments (or so they say), so the script should call the 64 bit version of Regedit when needed.

Anyway, after many hours of trying different combinations, I was able to deduce that the only key that cannot be modified when it is being called from vTask (or AutoIt, or Autohotkey for that matter) is "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run".

The "Wow6432Node" variants of that same key can be modified with no problem.

Finally, I remembered that Registry Workshop had command line support, so I replaced "Regedit.exe" for "RegWorkshopX64.exe" (wich installs on Program Files, not Program Files x86) on my script and it worked perfectly, I was finally able to modify "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run" again.

I hope someone else find this info useful in some way.

AutoIt or Autohotkey suffer the same limitation of vTask in this case.

Thank you.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...