L’accès au registre local est assez facile avec VBScript. Voici quelques exemples sur la façon de lire, écrire et supprimer des informations du registre local.
Syntaxe RegRead
object.RegRead(strName)
dim objShell
set objShell=CreateObject(« wscript.shell »)
strProductName=objShell.RegRead(« HKLM\Software\ » &_ »Microsoft\Windows NT\CurrentVersion\ProductName »)
wscript.echo « Votre ordinateur exécute » & strProductName
Syntaxe RegWrite
object.RegWrite(strName, anyValue [,strType])
Dim WshShell
Set WshShell = WScript.CreateObject(« WScript.Shell »)
WshShell.RegWrite « HKCU\Software\journaldufreenaute\Appname\ », &_ « SomeString », « REG_SZ »
Syntaxe RegDelete
object.RegDelete(strName)
Dim WshShell
Set WshShell = WScript.CreateObject(« WScript.Shell »)
WshShell.RegDelete « HKCU\Software\journaldufreenaute\Appname\ »