Hi Forum,
Is possible the _WinAPI_RegOpenKey($HKEY_LOCAL_MACHINE, 'SOFTWAREMicrosoftWindowsCurrentVersionUninstall', $KEY_NOTIFY) open something like $HKEY_LOCAL_MACHINE_64? On Windows 7 x64?
I try search a binary value for HKEY_LOCAL_MACHINE64, to use in _WinAPI_RegOpenKey, this exist? This work?
Or not work this way?
I belive $HKEY_LOCAL_MACHINE is not same value the HKEY_LOCAL_MACHINE64, is correctly?
Thank you for answer.
#include <APIRegConstants.au3>
#include <MsgBoxConstants.au3>
#include <WinAPIDiag.au3>
#include <WinAPIReg.au3>
Opt('TrayAutoPause', 0)
Local $hKey = _WinAPI_RegOpenKey($HKEY_LOCAL_MACHINE, 'SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall', $KEY_NOTIFY)
If @error Then
MsgBox(BitOR($MB_ICONERROR, $MB_SYSTEMMODAL), @extended, _WinAPI_GetErrorMessage(@extended))
Exit
EndIf
Local $hEvent = _WinAPI_CreateEvent()
If Not _WinAPI_RegNotifyChangeKeyValue($hKey, $REG_NOTIFY_CHANGE_LAST_SET, 0, 1, $hEvent) Then
Exit
EndIf
While 1
If Not _WinAPI_WaitForSingleObject($hEvent, 0) Then
Run(@AutoItExe & ' /AutoIt3ExecuteLine "MsgBox(4096, ''Registry'', ''The registry hive has been modified.'' & @CRLF & @CRLF & ''HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall'', 5)"')
If Not _WinAPI_RegNotifyChangeKeyValue($hKey, $REG_NOTIFY_CHANGE_LAST_SET, 0, 1, $hEvent) Then
ExitLoop
EndIf
EndIf
Sleep(100)
WEnd
_WinAPI_CloseHandle($hEvent)
_WinAPI_RegCloseKey($hKey)