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 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55
| Const HKEY_LOCAL_MACHINE = &H80000002
FichierSource = "Source.txt"
Const ForReading = 1
ScriptPath = Left(WScript.ScriptFullName,(Len(WScript.ScriptFullName) - (Len(WScript.ScriptName) + 1)))
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objTextFile = objFSO.OpenTextFile(ScriptPath & "\" & Fichiersource, ForReading)
'Else
' Wscript.Echo "Fichier introuvable, tâche annulée"
' Wscript.quit
'End If
Do Until objTextFile.AtEndOfStream
strComputer = objTextFile.Readline
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
'Renomer le fichier WGGina.dll
Set objREP = CreateObject("Scripting.FileSystemObject")
objREP.MoveFile "\\"& strComputer &"\C$\Program Files\Evidian\WG Advanced Login\WGGina.dll" , "\\"& strComputer &"\C$\Program Files\Evidian\WG Advanced Login\WGGina.dll.old"
'Copie de la Nouvelle WGGINA.dll
objREP.CopyFile "\\NomDuPC\C$\Script\Registre\WGGina.dll" , "\\"& strComputer &"\C$\Program Files\Evidian\WG Advanced Login\", OverWriteFiles
Loop
WScript.Quit |