Jump to content

Recommended Posts

Posted (edited)

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
Posted (edited)

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
Posted (edited)

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.

  • 2 months later...
Posted

I truly just have to change it to MACHINE64. We have Windows 7 64bit machines. I did not have any clue to fix this until you all helped me.

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
  • Recently Browsing   0 members

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