DCCD Posted March 29, 2015 Posted March 29, 2015 Hi, is this the right way to use RegWrite func on 32-bit and 64-bit Windows $HKEY_CURRENT_USER = 'HKEY_CURRENT_USER64' If @OSArch = 'X86' Then $HKEY_CURRENT_USER = 'HKEY_CURRENT_USER' RegWrite($HKEY_CURRENT_USER & '\Software\Microsoft\Windows\CurrentVersion\Run', 'Obd2Diag', 'REG_SZ', 'app') Thanks in advance [u][font=Arial Black]M[/font]y Blog, AVSS Parts[/u][font=Arial Black]Else[/font][font=Arial Black]L[/font]ibya Linux Users Group
jguinch Posted March 29, 2015 Posted March 29, 2015 (edited) The Run subkey in HKEY_CURRENT_USER seems to be a shared key. So you can just use HKEY_CURRENT_USER for both architectures. See this MSDN article about Registry Keys and WOW64 : https://msdn.microsoft.com/en-us/library/windows/desktop/aa384253%28v=vs.85%29.aspx Edited March 29, 2015 by jguinch Spoiler Network configuration UDF, _DirGetSizeByExtension, _UninstallList Firefox ConfigurationArray multi-dimensions, Printer Management UDF
DCCD Posted March 30, 2015 Author Posted March 30, 2015 Thanks a lot, i really appreciate your help, ... i just ask because Autoit Help file says For registry interaction, use HKCR64 or HKLM64 to bypass the redirection mechanism see Registry Functions documentation. When running on 64-bit Windows if you want to write a key or value specific to the 64-bit environment you have to suffix the HK... with 64 i.e. HKLM64. As you said no need to change anything here HKEY_CURRENT_USERSoftwareMicrosoftWindowsCurrentVersionRun . [u][font=Arial Black]M[/font]y Blog, AVSS Parts[/u][font=Arial Black]Else[/font][font=Arial Black]L[/font]ibya Linux Users Group
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