1 pièce(s) jointe(s)
Vb.net: Inexplicable défaut d'enregistrement dans BDR
Sous Visual Studio 2019 avec une form sous Vb.net j'essaie d'écrire dans la base de registre.
Code:
1 2 3
| HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Shell Icons
"29"="D:\My progs\Computer\Bin\NoArrow.ico"
"77"="D:\My progs\Computer\Bin\NoArrow.ico" |
L'inscription dans la BDR se fait mais à un emplacement complètement différent du choix ci-dessus
Le code pour faire cette inscription :
Code:
1 2 3 4 5
| Dim Rk As RegistryKey
Rk = Registry.LocalMachine.CreateSubKey("SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Shell Icons", [ATTACH=CONFIG]645235[/ATTACH]
permissionCheck:=RegistryKeyPermissionCheck.ReadWriteSubTree)
Rk.SetValue("29", Application.StartupPath + "Noarrow.ico") : Rk.SetValue("77", Application.StartupPath + "Noarrow.ico")
Rk.Close() : MsgBox("Le Raccourci des Icônes du bureau" + Chr(10) + Chr(10) + "a été supprimé - Redémarrer le Pc", MsgBoxStyle.Information, "Infos") |
L'inscription se fait à HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Explorer\Shell Icons
Voir image ci-joint - Je n'arrive pas à comprendre ce comportement d'autant plus qu'en fusionnant
un fichier *.reg cela fonctionne. Merci à tous de votre Aide.