Leo1906 Posted June 27, 2016 Posted June 27, 2016 (edited) Hello guys, I'm having a problem right here .. I was trying to create a few Registry Values using autoit, but it seems to me that Autoit can't write those values to this specific part of the registry .. Here is the code I'm trying to run: RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\test\command", "", "REG_SZ", "C:\test\convert.exe %1 geojson|convert") I'm definitly sure that the path is correct. Script is runned with Admin Rights. Everything's fine here. It's possible to read other values stored by Windows in this directory: MsgBox(0, 0, RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\Windows.burn", "Description")) But you can't edit those using Autoit. I don't know what this is. In my eyes it's an Autoit Bug or something like that ... Possible solution for me is to write a ".reg" file and run it afterwards, but this is an unclean method I don't really want to use .. Any suggestions on this? Edit: the OS is Windows 7 x64 German Language btw .. Edited June 27, 2016 by Leo1906
Developers Jos Posted June 27, 2016 Developers Posted June 27, 2016 You probably are running this with the 32bit version of Autoit3, which would result you update the Wow6432Node branch of the hive.: HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node \Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\test\command Just check there to see if you can find your update. Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
Leo1906 Posted June 27, 2016 Author Posted June 27, 2016 Damn .. Yeah you're right So I need to add a check on @OSArch and set the compile options to x64 I guess? Or I make an x64 and an x32 Version of the program compiling it with the corresponding options ..
AdamUL Posted June 27, 2016 Posted June 27, 2016 You can access the 64-bit registry from a 32 bit script by adding "64" to the registry path. Look under remarks in the help file for accessing the 64-bit registry. Local $s64Bit = "" If @OSArch = "X64" Then $s64Bit = "64" RegWrite("HKEY_LOCAL_MACHINE" & $s64Bit & "\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\test\command", "", "REG_SZ", "C:\test\convert.exe %1 geojson|convert") Adam
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now