Bonjour,

Voici mon script qui permet de modifier des clés de registre et je voudrais ajouter une boucle pour qu'il effectue cette modification pour un ensemble de machine que je renseigne dans un fichier texte.
Pouvez vous m'aider et m'apporter une explication sur mettre en place une boucle je pige pas tout
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
 
Const HKEY_LOCAL_MACHINE = &H80000002
 
strComputer = "NomDuPC"
Set objReg = GetObject("winmgmts:\\" & strComputer & "\root\default:StdRegProv")
strKeyPath ="Software\Enatel\WiseGuard\AdvancedLogin\"
objReg.CreateKey HKEY_LOCAL_MACHINE, strKeyPath
ValueName = "DontCheckSecurityServices"
dwValue = 1
objReg.SetDWORDValue HKEY_LOCAL_MACHINE, strKeyPath, ValueName, dwValue 
 
strKeyPath = "SOFTWARE\Enatel\WiseGuard\Debug\"
objReg.CreateKey HKEY_LOCAL_MACHINE, strKeyPath
ValueName = "TraceDir"
strValue = C:\Temp
objReg.SetStringValue HKEY_LOCAL_MACHINE, strKeyPath, ValueName, strValue
 
strKeyPath = "SOFTWARE\Enatel\WiseGuard\Debug\"
objReg.CreateKey HKEY_LOCAL_MACHINE, strKeyPath
ValueName = "TraceLevel"
dwValue = 5
objReg.SetDWORDValue HKEY_LOCAL_MACHINE, strKeyPath, ValueName, dwValue
 
strKeyPath = "SOFTWARE\Enatel\WiseGuard\Debug\"
objReg.CreateKey HKEY_LOCAL_MACHINE, strKeyPath
ValueName = "MaxFileSize"
dwValue = 1388
objReg.SetDWORDValue HKEY_LOCAL_MACHINE, strKeyPath, ValueName, dwValue
 
strKeyPath = "SOFTWARE\Enatel\WiseGuard\Debug\"
objReg.CreateKey HKEY_LOCAL_MACHINE, strKeyPath
ValueName = "LimitedLogFiles"
dwValue = 2
objReg.SetDWORDValue HKEY_LOCAL_MACHINE, strKeyPath, ValueName, dwValue
Merci d'avance pour votre aide