Code : Tout sélectionner
#include <Process.au3>
#include<File.au3>
#include<FileListToArray3.au3>
#include <Date.au3>
Const $_ms = 500 ; ajustement des pauses
Send("#d")
Sleep($_ms)
Run("control.exe sysdm.cpl,,4") ; ouvre la fenêtre 'Propriétés système'
WinWaitActive("Propriétés système","Protection du système")
Sleep(10000)
Send("{TAB}")
Sleep($_ms)
Send("{TAB}")
Sleep($_ms)
Send("{DOWN}")
Sleep($_ms)
Send("{SPACE}")
Sleep($_ms)
Send("{TAB}")
Sleep($_ms)
Send("{SPACE}")
Sleep($_ms)
Send("{TAB}")
Sleep($_ms)
Send("{SPACE}")
Sleep($_ms)
_RunDOS("cacls "& @HomeDrive &"\System~1 /E /G "& @UserName &":F")
DirCopy("\\CHRONO\Technicien\_Install Basique\Unlocker",""& @HomeDrive &"\Unlocker",1)
Sleep(10000)
$avCommon = _FileListToArray3 (""& @HomeDrive &"\System Volume Information","*", 0, 1, 1,"", 0)
$sFile = ""& @HomeDrive &"\Suppr.txt"
$avTemp = _FileListToArray3 (""& @HomeDrive &"\Windows.old","Temp", 0, 1, 1,"", 0)
$mFile = ""& @HomeDrive &"\SupprTem.txt"
$avTemp2 = _FileListToArray3 (""& @HomeDrive &"\Windows.old","Temporary*.*", 0, 1, 1,"", 0)
$cFile = ""& @HomeDrive &"\SuppTem2.txt"
_FileWriteFromArray($sFile, $avCommon, 1)
_FileWriteFromArray($mFile, $avTemp, 1)
_FileWriteFromArray($cFile, $avTemp2, 1)
Sleep(1000)
Run(""& @HomeDrive &"\Unlocker\unlocker.exe "& @HomeDrive &"\Suppr.txt /L /S /D")
ProcessWaitClose("unlocker.exe")
Run(""& @HomeDrive &"\Unlocker\unlocker.exe "& @HomeDrive &"\SupprTem.txt /L /S /D")
ProcessWaitClose("unlocker.exe")
Run(""& @HomeDrive &"\Unlocker\unlocker.exe "& @HomeDrive &"\SuppTem2.txt /L /S /D")
ProcessWaitClose("unlocker.exe")
If FileExists("C:\autorun.inf") Then
$avAutoC = _FileListToArray3 ("C:\","autorun.inf", 0, 0, 1,"", 0)
$acFile = ""& @HomeDrive &"\SuppAC.txt"
_FileWriteFromArray($acFile, $avAutoC, 1)
Sleep(500)
Run(""& @HomeDrive &"\Unlocker\unlocker.exe "& @HomeDrive &"\SuppAC.txt /L /S /D")
ProcessWaitClose("unlocker.exe")
EndIf
If FileExists("D:\autorun.inf") Then
$avAutoD = _FileListToArray3 ("D:\","autorun.inf", 0, 0, 1,"", 0)
$adFile = ""& @HomeDrive &"\SuppAD.txt"
_FileWriteFromArray($adFile, $avAutoD, 1)
Sleep(500)
Run(""& @HomeDrive &"\Unlocker\unlocker.exe "& @HomeDrive &"\SuppAD.txt /L /S /D")
ProcessWaitClose("unlocker.exe")
EndIf
If FileExists("E:\autorun.inf") Then
$avAutoE = _FileListToArray3 ("E:\","autorun.inf", 0, 0, 1,"", 0)
$aeFile = ""& @HomeDrive &"\SuppAE.txt"
_FileWriteFromArray($aeFile, $avAutoE, 1)
Sleep(500)
Run(""& @HomeDrive &"\Unlocker\unlocker.exe "& @HomeDrive &"\SuppAE.txt /L /S /D")
ProcessWaitClose("unlocker.exe")
EndIf
If FileExists("F:\autorun.inf") Then
$avAutoF = _FileListToArray3 ("F:\","autorun.inf", 0, 0, 1,"", 0)
$afFile = ""& @HomeDrive &"\SuppAF.txt"
_FileWriteFromArray($afFile, $avAutoF, 1)
Sleep(500)
Run(""& @HomeDrive &"\Unlocker\unlocker.exe "& @HomeDrive &"\SuppAF.txt /L /S /D")
ProcessWaitClose("unlocker.exe")
EndIf
If FileExists("G:\autorun.inf") Then
$avAutoG = _FileListToArray3 ("G:\","autorun.inf", 0, 0, 1,"", 0)
$agFile = ""& @HomeDrive &"\SuppAG.txt"
_FileWriteFromArray($agFile, $avAutoG, 1)
Sleep(500)
Run(""& @HomeDrive &"\Unlocker\unlocker.exe "& @HomeDrive &"\SuppAG.txt /L /S /D")
ProcessWaitClose("unlocker.exe")
EndIf
If FileExists("H:\autorun.inf") Then
$avAutoH = _FileListToArray3 ("H:\","autorun.inf", 0, 0, 1,"", 0)
$ahFile = ""& @HomeDrive &"\SuppAH.txt"
_FileWriteFromArray($ahFile, $avAutoH, 1)
Sleep(500)
Run(""& @HomeDrive &"\Unlocker\unlocker.exe "& @HomeDrive &"\SuppAH.txt /L /S /D")
ProcessWaitClose("unlocker.exe")
EndIf
If FileExists("I:\autorun.inf") Then
$avAutoI = _FileListToArray3 ("I:\","autorun.inf", 0, 0, 1,"", 0)
$aiFile = ""& @HomeDrive &"\SuppAI.txt"
_FileWriteFromArray($aiFile, $avAutoI, 1)
Sleep(500)
Run(""& @HomeDrive &"\Unlocker\unlocker.exe "& @HomeDrive &"\SuppAI.txt /L /S /D")
ProcessWaitClose("unlocker.exe")
EndIf
If FileExists("J:\autorun.inf") Then
$avAutoJ = _FileListToArray3 ("J:\","autorun.inf", 0, 0, 1,"", 0)
$ajFile = ""& @HomeDrive &"\SuppAJ.txt"
_FileWriteFromArray($ajFile, $avAutoJ, 1)
Sleep(500)
Run(""& @HomeDrive &"\Unlocker\unlocker.exe "& @HomeDrive &"\SuppAJ.txt /L /S /D")
ProcessWaitClose("unlocker.exe")
EndIf
If FileExists("K:\autorun.inf") Then
$avAutoK = _FileListToArray3 ("K:\","autorun.inf", 0, 0, 1,"", 0)
$akFile = ""& @HomeDrive &"\SuppAK.txt"
_FileWriteFromArray($akFile, $avAutoK, 1)
Sleep(500)
Run(""& @HomeDrive &"\Unlocker\unlocker.exe "& @HomeDrive &"\SuppAK.txt /L /S /D")
ProcessWaitClose("unlocker.exe")
EndIf
If FileExists("L:\autorun.inf") Then
$avAutoL = _FileListToArray3 ("L:\","autorun.inf", 0, 0, 1,"", 0)
$alFile = ""& @HomeDrive &"\SuppAL.txt"
_FileWriteFromArray($alFile, $avAutoL, 1)
Sleep(500)
Run(""& @HomeDrive &"\Unlocker\unlocker.exe "& @HomeDrive &"\SuppAL.txt /L /S /D")
ProcessWaitClose("unlocker.exe")
EndIf
If FileExists("M:\autorun.inf") Then
$avAutoM = _FileListToArray3 ("M:\","autorun.inf", 0, 0, 1,"", 0)
$amFile = ""& @HomeDrive &"\SuppAM.txt"
_FileWriteFromArray($amFile, $avAutoM, 1)
Sleep(500)
Run(""& @HomeDrive &"\Unlocker\unlocker.exe "& @HomeDrive &"\SuppAM.txt /L /S /D")
ProcessWaitClose("unlocker.exe")
EndIf
If FileExists("N:\autorun.inf") Then
$avAutoN = _FileListToArray3 ("N:\","autorun.inf", 0, 0, 1,"", 0)
$anFile = ""& @HomeDrive &"\SuppAN.txt"
_FileWriteFromArray($anFile, $avAutoN, 1)
Sleep(500)
Run(""& @HomeDrive &"\Unlocker\unlocker.exe "& @HomeDrive &"\SuppAN.txt /L /S /D")
ProcessWaitClose("unlocker.exe")
EndIf
If FileExists("O:\autorun.inf") Then
$avAutoO = _FileListToArray3 ("O:\","autorun.inf", 0, 0, 1,"", 0)
$aoFile = ""& @HomeDrive &"\SuppAO.txt"
_FileWriteFromArray($aoFile, $avAutoO, 1)
Sleep(500)
Run(""& @HomeDrive &"\Unlocker\unlocker.exe "& @HomeDrive &"\SuppAO.txt /L /S /D")
ProcessWaitClose("unlocker.exe")
EndIf
If FileExists("P:\autorun.inf") Then
$avAutoP = _FileListToArray3 ("P:\","autorun.inf", 0, 0, 1,"", 0)
$apFile = ""& @HomeDrive &"\SuppAP.txt"
_FileWriteFromArray($apFile, $avAutoP, 1)
Sleep(500)
Run(""& @HomeDrive &"\Unlocker\unlocker.exe "& @HomeDrive &"\SuppAP.txt /L /S /D")
ProcessWaitClose("unlocker.exe")
EndIf
If FileExists("Q:\autorun.inf") Then
$avAutoQ = _FileListToArray3 ("Q:\","autorun.inf", 0, 0, 1,"", 0)
$aqFile = ""& @HomeDrive &"\SuppAQ.txt"
_FileWriteFromArray($aqFile, $avAutoQ, 1)
Sleep(500)
Run(""& @HomeDrive &"\Unlocker\unlocker.exe "& @HomeDrive &"\SuppAQ.txt /L /S /D")
ProcessWaitClose("unlocker.exe")
EndIf
If FileExists("R:\autorun.inf") Then
$avAutoR = _FileListToArray3 ("R:\","autorun.inf", 0, 0, 1,"", 0)
$arFile = ""& @HomeDrive &"\SuppAR.txt"
_FileWriteFromArray($arFile, $avAutoR, 1)
Sleep(500)
Run(""& @HomeDrive &"\Unlocker\unlocker.exe "& @HomeDrive &"\SuppAR.txt /L /S /D")
ProcessWaitClose("unlocker.exe")
EndIf
If FileExists("S:\autorun.inf") Then
$avAutoS = _FileListToArray3 ("S:\","autorun.inf", 0, 0, 1,"", 0)
$asFile = ""& @HomeDrive &"\SuppAS.txt"
_FileWriteFromArray($asFile, $avAutoS, 1)
Sleep(500)
Run(""& @HomeDrive &"\Unlocker\unlocker.exe "& @HomeDrive &"\SuppAS.txt /L /S /D")
ProcessWaitClose("unlocker.exe")
EndIf
If FileExists("T:\autorun.inf") Then
$avAutoT = _FileListToArray3 ("T:\","autorun.inf", 0, 0, 1,"", 0)
$atFile = ""& @HomeDrive &"\SuppAT.txt"
_FileWriteFromArray($atFile, $avAutoT, 1)
Sleep(500)
Run(""& @HomeDrive &"\Unlocker\unlocker.exe "& @HomeDrive &"\SuppAT.txt /L /S /D")
ProcessWaitClose("unlocker.exe")
EndIf
If FileExists("U:\autorun.inf") Then
$avAutoU = _FileListToArray3 ("U:\","autorun.inf", 0, 0, 1,"", 0)
$auFile = ""& @HomeDrive &"\SuppAU.txt"
_FileWriteFromArray($auFile, $avAutoU, 1)
Sleep(500)
Run(""& @HomeDrive &"\Unlocker\unlocker.exe "& @HomeDrive &"\SuppAU.txt /L /S /D")
ProcessWaitClose("unlocker.exe")
EndIf
If FileExists("V:\autorun.inf") Then
$avAutoV = _FileListToArray3 ("V:\","autorun.inf", 0, 0, 1,"", 0)
$avFile = ""& @HomeDrive &"\SuppAV.txt"
_FileWriteFromArray($avFile, $avAutoV, 1)
Sleep(500)
Run(""& @HomeDrive &"\Unlocker\unlocker.exe "& @HomeDrive &"\SuppAV.txt /L /S /D")
ProcessWaitClose("unlocker.exe")
EndIf
If FileExists("W:\autorun.inf") Then
$avAutoW = _FileListToArray3 ("W:\","autorun.inf", 0, 0, 1,"", 0)
$awFile = ""& @HomeDrive &"\SuppAW.txt"
_FileWriteFromArray($awFile, $avAutoW, 1)
Sleep(500)
Run(""& @HomeDrive &"\Unlocker\unlocker.exe "& @HomeDrive &"\SuppAW.txt /L /S /D")
ProcessWaitClose("unlocker.exe")
EndIf
If FileExists("X:\autorun.inf") Then
$avAutoX = _FileListToArray3 ("X:\","autorun.inf", 0, 0, 1,"", 0)
$axFile = ""& @HomeDrive &"\SuppAX.txt"
_FileWriteFromArray($axFile, $avAutoX, 1)
Sleep(500)
Run(""& @HomeDrive &"\Unlocker\unlocker.exe "& @HomeDrive &"\SuppAX.txt /L /S /D")
ProcessWaitClose("unlocker.exe")
EndIf
If FileExists("Y:\autorun.inf") Then
$avAutoY = _FileListToArray3 ("Y:\","autorun.inf", 0, 0, 1,"", 0)
$ayFile = ""& @HomeDrive &"\SuppAY.txt"
_FileWriteFromArray($ayFile, $avAutoY, 1)
Sleep(500)
Run(""& @HomeDrive &"\Unlocker\unlocker.exe "& @HomeDrive &"\SuppAY.txt /L /S /D")
ProcessWaitClose("unlocker.exe")
EndIf
If FileExists("Z:\autorun.inf") Then
$avAutoZ = _FileListToArray3 ("Z:\","autorun.inf", 0, 0, 1,"", 0)
$azFile = ""& @HomeDrive &"\SuppAZ.txt"
_FileWriteFromArray($azFile, $avAutoZ, 1)
Sleep(500)
Run(""& @HomeDrive &"\Unlocker\unlocker.exe "& @HomeDrive &"\SuppAZ.txt /L /S /D")
ProcessWaitClose("unlocker.exe")
EndIf
Sleep(1000)
DirRemove(""& @HomeDrive &"\Unlocker",1)
FileDelete(""& @HomeDrive &"\Suppr.txt")
FileDelete(""& @HomeDrive &"\SupprTem.txt")
FileDelete(""& @HomeDrive &"\SuppTem2.txt")
FileDelete(""& @HomeDrive &"\SuppAC.txt")
FileDelete(""& @HomeDrive &"\SuppAD.txt")
FileDelete(""& @HomeDrive &"\SuppAE.txt")
FileDelete(""& @HomeDrive &"\SuppAF.txt")
FileDelete(""& @HomeDrive &"\SuppAG.txt")
FileDelete(""& @HomeDrive &"\SuppAH.txt")
FileDelete(""& @HomeDrive &"\SuppAI.txt")
FileDelete(""& @HomeDrive &"\SuppAJ.txt")
FileDelete(""& @HomeDrive &"\SuppAK.txt")
FileDelete(""& @HomeDrive &"\SuppAL.txt")
FileDelete(""& @HomeDrive &"\SuppAM.txt")
FileDelete(""& @HomeDrive &"\SuppAN.txt")
FileDelete(""& @HomeDrive &"\SuppAO.txt")
FileDelete(""& @HomeDrive &"\SuppAP.txt")
FileDelete(""& @HomeDrive &"\SuppAQ.txt")
FileDelete(""& @HomeDrive &"\SuppAR.txt")
FileDelete(""& @HomeDrive &"\SuppAS.txt")
FileDelete(""& @HomeDrive &"\SuppAT.txt")
FileDelete(""& @HomeDrive &"\SuppAU.txt")
FileDelete(""& @HomeDrive &"\SuppAV.txt")
FileDelete(""& @HomeDrive &"\SuppAW.txt")
FileDelete(""& @HomeDrive &"\SuppAX.txt")
FileDelete(""& @HomeDrive &"\SuppAY.txt")
FileDelete(""& @HomeDrive &"\SuppAZ.txt")
Run("control.exe sysdm.cpl,,4") ; ouvre la fenêtre 'Propriétés système'
WinWaitActive("Propriétés système","Protection du système")
Sleep($_ms)
Send("{TAB}")
Sleep($_ms)
Send("{DOWN}")
Sleep($_ms)
Send("{SPACE}")
Sleep($_ms)
Send("{TAB}")
Sleep($_ms)
Send("{SPACE}")
Sleep($_ms)