Jump to content

Can't add registry key


Recommended Posts

Hi,

I am trying to add a registry key with using RegWrite but it is not doing it. I also added the #RequireAdmin at the top of the script. Only if I run the reg file manually, the key is added.

Here is the key.

RegWrite("HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindowsCurrentVersion","test","REG_SZ","C:Windowstest.bmp")

 

 

Please advise.

 

Thanks

Edited by aiuse
Link to comment
Share on other sites

  • Moderators

Hi, aiuse. Is it being created in HKEY_LOCAL_MACHINESOFTWAREWow6432NodeMicrosoftWindowsCurrentVersion?

"Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball

How to get your question answered on this forum!

Link to comment
Share on other sites

Hi JLogan, you are right. I just checked and found that was created under HKEY_LOCAL_MACHINESOFTWAREWow6432NodeMicrosoftWindowsCurrentVersion. Do you know why it is not created under HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindowsCurrentVersion? It is Win7 x64 machine but i don't think it is matter because the manual process did it.

I really need it to be added to the HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindowsCurrentVersion. Please advise. Thanks

Edited by aiuse
Link to comment
Share on other sites

I believe it has something to do with registry redirection, where the os decides where a key is meant for.

You have two options, websearch "disable redirection" to explicitly turn it off and back on after write, or it could be as simple as #Autoitwrapper usex64 = n

(or something like that)

EDIT: 

#AutoIt3Wrapper_UseX64=n
Edited by JohnOne

AutoIt Absolute Beginners    Require a serial    Pause Script    Video Tutorials by Morthawt   ipify 

Monkey's are, like, natures humans.

Link to comment
Share on other sites

  • Moderators

Actually in this case, I believe it would be #AutoIt3Wrapper_UseX64=y if he would like it not to go into the x86 area.

"Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball

How to get your question answered on this forum!

Link to comment
Share on other sites

  • Moderators

Glad you got it working. Odd that it worked for me without the HKEY_LOCAL_MACHINE64. Wonder what the difference was.

"Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball

How to get your question answered on this forum!

Link to comment
Share on other sites

  • 2 months later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...