A voir également:
- [VBS] Modification Clé Base de registre
- Base de registre - Guide
- Clé usb non détectée - Guide
- Clé windows 8 - Guide
- Suivi de modification word - Guide
- Formater clé usb - Guide
3 réponses
Je fourni le code pour la valeure REG_SZ si jamais quelqun en a besoin. Il modifie les Suffixe DNS avec un ordre d'utilisation sur un poste distant ou non. (Je cherche encore comment le faire pour une liste de PC dans un fichier)
HKEY_LOCAL_MACHINE = &H80000002 strComputer = "NOM-PC" Set objReg = GetObject("winmgmts:\\" & strComputer & "\root\default:StdRegProv") strKeyPath = "SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\" objReg.CreateKey HKEY_LOCAL_MACHINE, strKeyPath ValueName = "SearchList" strValue = "PREMIER-DNS,SECOND" ' troisieme, quatrieme, ... objReg.SetStringValue HKEY_LOCAL_MACHINE, strKeyPath, ValueName, strValue
Bonjour
pour changer une valeur REG_SZ, voir site microsoft :
The SetStringValue method sets the data value for a named value whose data type is REG_SZ.
uint32 SetStringValue(
[in] uint32 hDefKey,
[in] string sSubKeyName,
[in] string sValueName,
[in] string sValue
);
donc essaye
...
strvalue = "un texte REG_SZ"
objReg.SetStringValue HKEY_LOCAL_MACHINE, strKeyPath, ValueName, strValue
pour changer une valeur REG_SZ, voir site microsoft :
The SetStringValue method sets the data value for a named value whose data type is REG_SZ.
uint32 SetStringValue(
[in] uint32 hDefKey,
[in] string sSubKeyName,
[in] string sValueName,
[in] string sValue
);
donc essaye
...
strvalue = "un texte REG_SZ"
objReg.SetStringValue HKEY_LOCAL_MACHINE, strKeyPath, ValueName, strValue