Impossible d’écrire dans HKEY_LOCAL_MACHINE du registre Win 10 64 bits. Par contre je peux écrire ce code dans HKEY_CURRENT_USER.
J'ai fait un petit code en AutoIt qui me sert à lance une application au démarrage de Windows 10 64 Bits. Pour cela j’utilise le code suivant compilé/exécuter en 32 bits exécuté sur Windows 10 64 bits :
#RequireAdmin
$Reg=RegRead("HKEY_LOCAL_MACHINE \Software\Microsoft\Windows\CurrentVersion\Run","Appli")
If ($Reg="") then RegWrite("HKEY_LOCAL_MACHINE \Software\Microsoft\Windows\CurrentVersion\Run","test","REG_SZ","c:\Mon application.exe")
$Reg=RegRead("HKEY_LOCAL_MACHINE \Software\Microsoft\Windows\CurrentVersion\Run","Appli")
If ($Reg="") then RegWrite("HKEY_LOCAL_MACHINE \Software\Microsoft\Windows\CurrentVersion\Run","test","REG_SZ","c:\Mon application.exe")
Cordialement.