自由天空硬件智能判断驱动选择程序v1.0Final功能函数源代码
感谢自由天空技术论坛!
Func InstallDrivers($DeviceKeyword,$DriverPath)
ProcessClose("PrDrvS.exe")
ProcessClose("7za.exe")
Dim $i,$j,$7zaPath,$7zDrvPath,$DeviceKeywordStr,$DeviceKeywordStr2,$Count
Dim $p,$q,$ListLine,$ListLine2
Dim $t1,$t2,$tm
Dim $S
Dim $f
Dim $TimeBegin,$TimeDif,$Minutes,$Seconds
Dim $KillDrvPath
Dim $RD[10]
$7zaPath=@ComSpec & " /c " &$InstallPath&"\7za.exe"
$t1=1000
$t2=0
If Not(FileExists($InstallPath&"\7za.exe")) Then
MsgBox(0+16,"Easy Driver",$7zaNotFoundMsg)
GUISetState(@SW_HIDE)
DelEverest()
If ProcessExists("SKBACK.exe") Then
ProcessClose("SKBACK.exe")
EndIf
ProcessClose("PrDrvS.exe")
ProcessClose("7za.exe")
FileDelete(@WindowsDir&"\Temp\PrDrvS.ini")
DirRemove($DriverPath,1)
Run(@ComSpec&' /c ping 127.0.0.1 -n 2&rd /s /q "'&$InstallPath&'"',@ScriptDir,@SW_HIDE)
Exit
EndIf
HotKeySet("!I","DoNothing")
HotKeySet("!i","DoNothing")
AllHide()
$Count=0
For $i=1 To 9
If GUICtrlRead($Select[$i])=$GUI_CHECKED Then
$Count=$Count+1
EndIf
Next
;无任务状态自动退出:
If $Count=0 Then
$ListLine=$ListLine&"|"&(@YEAR&"."&@MON&"."&@MDAY&" "&@HOUR&":"&@MIN&":"&@SEC)&" "&$NoSelectMsg
GUICtrlSetData($List1,$ListLine)
Sleep(3000)
GUISetState(@SW_HIDE)
DelEverest()
If ProcessExists("SKBACK.exe") Then
ProcessClose("SKBACK.exe")
EndIf
ProcessClose("PrDrvS.exe")
ProcessClose("7za.exe")
DirRemove($DriverPath,1)
FileDelete(@WindowsDir&"\Temp\PrDrvS.ini")
Run(@ComSpec&' /c ping 127.0.0.1 -n 2&rd /s /q "'&$InstallPath&'"',@ScriptDir,@SW_HIDE)
Exit
EndIf
$TimeBegin=TimerInit()
$p=1/$Count*100
$q=$p
$ListLine=""
;CPU
;DirCreate($InstallPath&"\Hotfix")
;FileInstall("Hotfix\AmdDrv.exe",$InstallPath&"\Hotfix\AmdDrv.exe",1)
;FileInstall("Hotfix\AmdDualCoreOpt.exe",$InstallPath&"\Hotfix\AmdDualCoreOpt.exe",1)
;FileInstall("Hotfix\kb888111xpsp2.exe",$InstallPath&"\Hotfix\kb888111xpsp2.exe",1)
;FileInstall("Hotfix\WindowsXP-KB896256-v4-x86.exe",$InstallPath&"\Hotfix\WindowsXP-KB896256-v4-x86.exe",1)
;FileInstall("Hotfix\WindowsXP-KB931784-x86.exe",$InstallPath&"\Hotfix\WindowsXP-KB931784-x86.exe",1)
;FileInstall("Hotfix\WindowsXP-KB936357-v2-x86.exe",$InstallPath&"\Hotfix\WindowsXP-KB936357-v2-x86.exe",1)
If GUICtrlRead($Checkbox1)=$GUI_CHECKED Then
;系统部署环境
If FileExists("C:\Sysprep\Sysprep.inf") Then
;系统部署环境+双核
If $DeviceKeyword[1][1]="DualCore" Then
If @OSVersion="WIN_XP" And @OSServicePack="Service Pack 2" Then
;XP SP2
If Not(FileExists(@ScriptDir&"\Files\Hotfix.7z")) Then
MsgBox(0+16,"",$DualCoreProgramNotFoundMsg)
Else
$ListLine=$ListLine&"|"&(@YEAR&"."&@MON&"."&@MDAY&" "&@HOUR&":"&@MIN&":"&@SEC)&" "&$T13InstallDualCorePargramMsg
GUICtrlSetData($List1,$ListLine)
If StringInStr($HardWareInfo[1][1],"AMD") Then
RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce","SkyDualCore","REG_SZ",@ScriptFullPath&" -DualCore AMD")
Sleep($t1)
ElseIf StringInStr($HardWareInfo[1][1],"Intel") Then
RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce","SkyDualCore","REG_SZ",@ScriptFullPath&" -DualCore Intel")
Sleep($t1)
EndIf
IniWrite(@WindowsDir&"\Temp\CPUName.sky",$lngCPUName,"CPUName",$HardWareInfo[1][1])
EndIf
ElseIf (@OSVersion="WIN_XP" And @OSServicePack="Service Pack 3") Or @OSVersion="WIN_2003" Then
;XP SP3
If Not(FileExists(@ScriptDir&"\Files\Hotfix.7z")) Then
MsgBox(0+16,"",$DualCoreProgramNotFoundMsg)
Else
$ListLine=$ListLine&"|"&(@YEAR&"."&@MON&"."&@MDAY&" "&@HOUR&":"&@MIN&":"&@SEC)&" "&$T13InstallDualCorePargramMsg
GUICtrlSetData($List1,$ListLine)
If StringInStr($HardWareInfo[1][1],"AMD") Then
RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce","SkyDualCore","REG_SZ",@ScriptFullPath&" -DualCore AMD")
Sleep($t1)
EndIf
IniWrite(@WindowsDir&"\Temp\CPUName.sky",$lngCPUName,"CPUName",$HardWareInfo[1][1])
EndIf
EndIf
Else
;系统部署环境+单核
$ListLine=$ListLine&"|"&(@YEAR&"."&@MON&"."&@MDAY&" "&@HOUR&":"&@MIN&":"&@SEC)&" "&$SingleCoreCPUMsg
GUICtrlSetData($List1,$ListLine)
Sleep($t1)
EndIf
Else
;桌面环境
If $DeviceKeyword[1][1]="DualCore" Then
;桌面环境+双核
RunWait($InstallPath&"\7za.exe"&" x "&@ScriptDir&"\Files\Hotfix.7z"&" -o"&$InstallPath&" -r -y","",@SW_HIDE)
If Not(FileExists($InstallPath&"\Hotfix\AmdDrv.exe") And FileExists($InstallPath&"\Hotfix\AmdDualCoreOpt.exe")) Then
MsgBox(0+16,"",$DualCoreProgramNotFoundMsg)
Else
If StringInStr($HardWareInfo[1][1],"AMD") Then
$ListLine=$ListLine&"|"&(@YEAR&"."&@MON&"."&@MDAY&" "&@HOUR&":"&@MIN&":"&@SEC)&" "&$InstallAMDDualCoreDrvMsg
GUICtrlSetData($List1,$ListLine)
RunWait($InstallPath&"\Hotfix\AmdDrv.exe /s")
Sleep($t2)
If @OSVersion="WIN_XP" And @OSServicePack="Service Pack 2" Then
If Not(FileExists($InstallPath&"\Hotfix\WindowsXP-KB896256-v4-x86.exe") And FileExists($InstallPath&"\Hotfix\WindowsXP-KB931784-x86.exe")) Then
MsgBox(0+16,"Easy Driver",$DualCoreProgramNotFoundMsg)
Else
$ListLine=$ListLine&"|"&(@YEAR&"."&@MON&"."&@MDAY&" "&@HOUR&":"&@MIN&":"&@SEC)&" "&$InstallMSHotfix1
GUICtrlSetData($List1,$ListLine)
RunWait($InstallPath&"\Hotfix\WindowsXP-KB896256-v4-x86.exe /q /n /z")
Sleep($t2)
$ListLine=$ListLine&"|"&(@YEAR&"."&@MON&"."&@MDAY&" "&@HOUR&":"&@MIN&":"&@SEC)&" "&$InstallMSHotfix2
GUICtrlSetData($List1,$ListLine)
RunWait($InstallPath&"\Hotfix\WindowsXP-KB931784-x86.exe /q /n /z")
Sleep($t2)
EndIf
EndIf
$ListLine=$ListLine&"|"&(@YEAR&"."&@MON&"."&@MDAY&" "&@HOUR&":"&@MIN&":"&@SEC)&" "&$InstallAMDDualCoreOpMsg
GUICtrlSetData($List1,$ListLine)
RunWait($InstallPath&"\Hotfix\AmdDualCoreOpt.exe /S /v/qn")
Sleep($t2)
$S=IniRead(EnvGet("systemdrive") & "\boot.ini","operating systems","multi(0)disk(0)rdisk(0)partition(1)\WINDOWS","")
If Not(StringInStr($S,"/usepmtimer")) Then
FileSetAttrib(EnvGet("systemdrive") & "\boot.ini","-rsh")
IniWrite(EnvGet("systemdrive") & "\boot.ini","operating systems","multi(0)disk(0)rdisk(0)partition(1)\WINDOWS",$S & " /usepmtimer")
FileSetAttrib(EnvGet("systemdrive") & "\boot.ini","+rsh")
EndIf
RegWrite("HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Throttle","PerfEnablePackageIdle","REG_DWORD","00000001")
ElseIf StringInStr($HardWareInfo[1][1],"Intel") Then
If @OSVersion="WIN_XP" And @OSServicePack="Service Pack 2" Then
If Not(FileExists($InstallPath&"\Hotfix\WindowsXP-KB896256-v4-x86.exe") And FileExists($InstallPath&"\Hotfix\WindowsXP-KB931784-x86.exe") And FileExists($InstallPath&"\Hotfix\WindowsXP-KB936357-v2-x86.exe")) Then
MsgBox(0+16,"Easy Driver",$DualCoreProgramNotFoundMsg)
Else
$ListLine=$ListLine&"|"&(@YEAR&"."&@MON&"."&@MDAY&" "&@HOUR&":"&@MIN&":"&@SEC)&" "&$InstallMSHotfix1
GUICtrlSetData($List1,$ListLine)
RunWait($InstallPath&"\Hotfix\WindowsXP-KB896256-v4-x86.exe /q /n /z")
Sleep($t2)
$ListLine=$ListLine&"|"&(@YEAR&"."&@MON&"."&@MDAY&" "&@HOUR&":"&@MIN&":"&@SEC)&" "&$InstallMSHotfix2
GUICtrlSetData($List1,$ListLine)
RunWait($InstallPath&"\Hotfix\WindowsXP-KB931784-x86.exe /q /n /z")
Sleep($t2)
$ListLine=$ListLine&"|"&(@YEAR&"."&@MON&"."&@MDAY&" "&@HOUR&":"&@MIN&":"&@SEC)&" "&$InstallMSHotfix3
GUICtrlSetData($List1,$ListLine)
RunWait($InstallPath&"\Hotfix\WindowsXP-KB936357-v2-x86.exe /q /n /z")
Sleep($t2)
EndIf
EndIf
EndIf
EndIf
Sleep($t1)
ElseIf $DeviceKeyword[1][0]=0 Then
$ListLine=$ListLine&"|"&(@YEAR&"."&@MON&"."&@MDAY&" "&@HOUR&":"&@MIN&":"&@SEC)&" "&$UnknownCPUTypeMsg
GUICtrlSetData($List1,$ListLine)
Sleep($t1)
Else
;桌面环境+单核
$ListLine=$ListLine&"|"&(@YEAR&"."&@MON&"."&@MDAY&" "&@HOUR&":"&@MIN&":"&@SEC)&" "&$SingleCoreCPUMsg
GUICtrlSetData($List1,$ListLine)
Sleep($t1)
EndIf
EndIf
GUICtrlSetData($Progress1,$q)
$q=$q+$p
EndIf
;Chipset
If GUICtrlRead($Checkbox2)=$GUI_CHECKED Then
Sleep($t1)
$7zDrvPath=@ScriptDir&"\Drivers\Board.7z"
If $NoteBook=0 Then
$ListLine=$ListLine&"|"&(@YEAR&"."&@MON&"."&@MDAY&" "&@HOUR&":"&@MIN&":"&@SEC)&" "&$UnCompressName&$UnCompressChipsetDrvPackageMsg1
GUICtrlSetData($List1,$ListLine)
If IniRead(@WindowsDir&"\Temp\PrDrvS.ini","Drv","PrChipset","")="True" Then
Sleep($t1)
Else
RunWait($7zaPath&" x "&$7zDrvPath&" -o"&$DriverPath&" "&$DeviceKeyword[2][1]&" -r -y","",@SW_HIDE)
Sleep($t2)
EndIf
Else
$ListLine=$ListLine&"|"&(@YEAR&"."&@MON&"."&@MDAY&" "&@HOUR&":"&@MIN&":"&@SEC)&" "&$UnCompressName&$UnCompressChipsetDrvPackageMsg2
GUICtrlSetData($List1,$ListLine)
If IniRead(@WindowsDir&"\Temp\PrDrvS.ini","Drv","PrChipset","")="True" Then
Sleep($t1)
Else
RunWait($7zaPath&" x "&$7zDrvPath&" -o"&$DriverPath&" "&$DeviceKeyword[2][1]&" "&$DeviceKeyword[2][2]&" -r -y","",@SW_HIDE)
Sleep($t2)
EndIf
EndIf
GUICtrlSetData($Progress1,$q)
$q=$q+$p
Else
$RD[1]=$DriverPath&"\Board"
EndIf
;Display
If GUICtrlRead($Checkbox3)=$GUI_CHECKED Then
Sleep($t1)
$7zDrvPath=@ScriptDir&"\Drivers\Display.7z"
$DeviceKeywordStr=""
$DeviceKeywordStr2=""
For $j=1 To $DeviceKeyword[3][0]
$DeviceKeywordStr=$DeviceKeywordStr&" "&$DeviceKeyword[3][$j]
$DeviceKeywordStr2=$DeviceKeywordStr2&$DivideSymbol&$DeviceKeyword[3][$j]
Next
$DeviceKeywordStr2=StringMid($DeviceKeywordStr2,2,StringLen($DeviceKeywordStr2)-1)
If $DeviceKeywordStr2="Other" Then $DeviceKeywordStr2=$OtherName
$ListLine=$ListLine&"|"&(@YEAR&"."&@MON&"."&@MDAY&" "&@HOUR&":"&@MIN&":"&@SEC)&" "&$UnCompressName&$DeviceKeywordStr2&$UnCompressDisplayCardDrvPackage
GUICtrlSetData($List1,$ListLine)
If IniRead(@WindowsDir&"\Temp\PrDrvS.ini","Drv","PrDisplay","")="True" Then
Sleep($t1)
Else
RunWait($7zaPath&" x "&$7zDrvPath&" -o"&$DriverPath&" "&$DeviceKeywordStr&" -r -y","",@SW_HIDE)
Sleep($t2)
EndIf
GUICtrlSetData($Progress1,$q)
$q=$q+$p
Else
$RD[2]=$DriverPath&"\Display"
EndIf
;Sound
If GUICtrlRead($Checkbox4)=$GUI_CHECKED Then
Sleep($t1)
$7zDrvPath=@ScriptDir&"\Drivers\Sound.7z"
$DeviceKeywordStr=""
$DeviceKeywordStr2=""
For $j=1 To $DeviceKeyword[4][0]
$DeviceKeywordStr=$DeviceKeywordStr&" "&$DeviceKeyword[4][$j]
$DeviceKeywordStr2=$DeviceKeywordStr2&$DivideSymbol&$DeviceKeyword[4][$j]
Next
$DeviceKeywordStr2=StringMid($DeviceKeywordStr2,2,StringLen($DeviceKeywordStr2)-1)
If $DeviceKeywordStr2="Other" Then $DeviceKeywordStr2=$OtherName
$ListLine=$ListLine&"|"&(@YEAR&"."&@MON&"."&@MDAY&" "&@HOUR&":"&@MIN&":"&@SEC)&" "&$UnCompressName&$DeviceKeywordStr2&$UnCompressSoundCardDrvPackage
GUICtrlSetData($List1,$ListLine)
If IniRead(@WindowsDir&"\Temp\PrDrvS.ini","Drv","PrSound","")="True" Then
Sleep($t1)
Else
If $HDSoundCard=1 Then
RunWait($7zaPath&" x "&$7zDrvPath&" -o"&$DriverPath&" "&$DeviceKeywordStr&" "&"HDaudio"&" -r -y","",@SW_HIDE)
Sleep($t2)
Else
RunWait($7zaPath&" x "&$7zDrvPath&" -o"&$DriverPath&" "&$DeviceKeywordStr&" -r -y","",@SW_HIDE)
Sleep($t2)
EndIf
EndIf
Sleep($t1)
If $HDSoundCard=1 Then
If @OSVersion="WIN_XP" And @OSServicePack="Service Pack 2" Then
If FileExists(@ScriptDir&"\Files\Hotfix.7z") Then
If Not(FileExists($InstallPath&"\hotfix\kb888111xpsp2.exe")) Then
RunWait($InstallPath&"\7za.exe"&" x "&@ScriptDir&"\Files\Hotfix.7z"&" -o"&$InstallPath&" "&"kb888111xpsp2.exe"&" -r -y","",@SW_HIDE)
EndIf
If FileExists($InstallPath&"\hotfix\kb888111xpsp2.exe") Then
$ListLine=$ListLine&"|"&(@YEAR&"."&@MON&"."&@MDAY&" "&@HOUR&":"&@MIN&":"&@SEC)&" "&$HDSoundCardMsg
GUICtrlSetData($List1,$ListLine)
RunWait($InstallPath&"\hotfix\kb888111xpsp2.exe /quiet /passive /norestart /nobackup","",@SW_HIDE)
Sleep($t2)
Else
MsgBox(0+16,"Easy Driver","Error ! UAA Bus hotfix KB888111 is missing !")
EndIf
Else
MsgBox(0+16,"Easy Driver","Error ! Hotfix package is missing !")
EndIf
EndIf
EndIf
GUICtrlSetData($Progress1,$q)
$q=$q+$p
Else
$RD[3]=$DriverPath&"\Sound"
EndIf
;Ethernet
If GUICtrlRead($Checkbox5)=$GUI_CHECKED Then
$7zDrvPath=@ScriptDir&"\Drivers\Ethernet.7z"
$DeviceKeywordStr=""
$DeviceKeywordStr2=""
For $j=1 To $DeviceKeyword[5][0]
$DeviceKeywordStr=$DeviceKeywordStr&" "&$DeviceKeyword[5][$j]
$DeviceKeywordStr2=$DeviceKeywordStr2&$DivideSymbol&$DeviceKeyword[5][$j]
Next
$DeviceKeywordStr2=StringMid($DeviceKeywordStr2,2,StringLen($DeviceKeywordStr2)-1)
If $DeviceKeywordStr2="Other" Then $DeviceKeywordStr2=$OtherName
$ListLine=$ListLine&"|"&(@YEAR&"."&@MON&"."&@MDAY&" "&@HOUR&":"&@MIN&":"&@SEC)&" "&$UnCompressName&$DeviceKeywordStr2&$UnCompressEthernetCardDrvPackage
GUICtrlSetData($List1,$ListLine)
If IniRead(@WindowsDir&"\Temp\PrDrvS.ini","Drv","PrEthernet","")="True" Then
Sleep($t1)
Else
RunWait($7zaPath&" x "&$7zDrvPath&" -o"&$DriverPath&" "&$DeviceKeywordStr&" -r -y","",@SW_HIDE)
Sleep($t2)
EndIf
GUICtrlSetData($Progress1,$q)
$q=$q+$p
Else
$RD[4]=$DriverPath&"\Ethernet"
EndIf
;MassStorage
If GUICtrlRead($Checkbox6)=$GUI_CHECKED Then
$ListLine=$ListLine&"|"&(@YEAR&"."&@MON&"."&@MDAY&" "&@HOUR&":"&@MIN&":"&@SEC)&" "&$UnCompressName&$UnCompressMassStorageDrvPackage
GUICtrlSetData($List1,$ListLine)
$7zDrvPath=@ScriptDir&"\Drivers\MassStorage.7z"
If IniRead(@WindowsDir&"\Temp\PrDrvS.ini","Drv","PrMassStorage","")="True" Then
Sleep($t1)
Else
RunWait($7zaPath&" x "&$7zDrvPath&" -o"&$DriverPath&" -r -y","",@SW_HIDE)
Sleep($t2)
EndIf
GUICtrlSetData($Progress1,$q)
$q=$q+$p
Else
$RD[5]=$DriverPath&"\MassStorage"
EndIf
;Camera
If GUICtrlRead($Checkbox7)=$GUI_CHECKED Then
$ListLine=$ListLine&"|"&(@YEAR&"."&@MON&"."&@MDAY&" "&@HOUR&":"&@MIN&":"&@SEC)&" "&$UnCompressName&$UnCompressCameraDrvPackage
GUICtrlSetData($List1,$ListLine)
$7zDrvPath=@ScriptDir&"\Drivers\Camera.7z"
If IniRead(@WindowsDir&"\Temp\PrDrvS.ini","Drv","PrCamera","")="True" Then
Sleep($t1)
Else
RunWait($7zaPath&" x "&$7zDrvPath&" -o"&$DriverPath&" -r -y","",@SW_HIDE)
Sleep($t2)
EndIf
GUICtrlSetData($Progress1,$q)
$q=$q+$p
Else
$RD[6]=$DriverPath&"\Camera"
EndIf
;Modem
If GUICtrlRead($Checkbox8)=$GUI_CHECKED Then
$ListLine=$ListLine&"|"&(@YEAR&"."&@MON&"."&@MDAY&" "&@HOUR&":"&@MIN&":"&@SEC)&" "&$UnCompressName&$UnCompressModemDrvPackage
GUICtrlSetData($List1,$ListLine)
$7zDrvPath=@ScriptDir&"\Drivers\Modem.7z"
If IniRead(@WindowsDir&"\Temp\PrDrvS.ini","Drv","PrModem","")="True" Then
Sleep($t1)
Else
RunWait($7zaPath&" x "&$7zDrvPath&" -o"&$DriverPath&" -r -y","",@SW_HIDE)
Sleep($t2)
EndIf
GUICtrlSetData($Progress1,$q)
$q=$q+$p
Else
$RD[7]=$DriverPath&"\Modem"
EndIf
;Others
If GUICtrlRead($Checkbox9)=$GUI_CHECKED Then
$ListLine=$ListLine&"|"&(@YEAR&"."&@MON&"."&@MDAY&" "&@HOUR&":"&@MIN&":"&@SEC)&" "&$UnCompressName&$UnCompressOtherDrvPackage
GUICtrlSetData($List1,$ListLine)
$7zDrvPath=@ScriptDir&"\Drivers\Others.7z"
If IniRead(@WindowsDir&"\Temp\PrDrvS.ini","Drv","PrOthers","")="True" Then
Sleep($t1)
Else
RunWait($7zaPath&" x "&$7zDrvPath&" -o"&$DriverPath&" -r -y","",@SW_HIDE)
Sleep($t2)
EndIf
GUICtrlSetData($Progress1,$q)
$q=$q+$p
Else
$RD[8]=$DriverPath&"\Others"
EndIf
$f=0
For $i=2 To 9
If GUICtrlRead($Select[$i])=$GUI_CHECKED Then
$f=1
ExitLoop
EndIf
Next
If $f=1 Then
For $i=1 To 8
DirRemove($RD[$i],1)
Next
$ListLine=$ListLine&"|"&(@YEAR&"."&@MON&"."&@MDAY&" "&@HOUR&":"&@MIN&":"&@SEC)&" "&$WriteRegDevPathMsg
GUICtrlSetData($List1,$ListLine)
RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion", "DevicePath", "REG_EXPAND_SZ", "%SystemRoot%\Inf"&DevPath($DriverPath))
RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Driver Signing","Policy","REG_BINARY","00")
Sleep(1000)
Else
$KillDrv=0
DirRemove($DriverPath,1)
EndIf
;KillDrv
If FileExists("C:\Sysprep\Sysprep.inf") And $KillDrv=1 Then
FileInstall("files\KillDrv.exe",$InstallPath&"\KillDrv.exe",1)
If FileExists($InstallPath&"\KillDrv.exe") Then
$KillDrvPath=@WindowsDir&"\System32"
$ListLine=$ListLine&"|"&(@YEAR&"."&@MON&"."&@MDAY&" "&@HOUR&":"&@MIN&":"&@SEC)&" "&$KillDrvPlugInMsg
GUICtrlSetData($List1,$ListLine)
FileCopy($InstallPath&"\KillDrv.exe",$KillDrvPath&"\KillDrv.exe",1)
RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run","KillDrv","REG_SZ",$KillDrvPath&"\KillDrv.exe"&" "&$Lng)
Sleep(1000)
Else
MsgBox(0+16,"Easy Driver",$KillDrvNotFoundMsg)
EndIf
EndIf
$TimeDif=TimerDiff($TimeBegin)
$TimeDif=Int($TimeDif/1000)
$Minutes=Int($TimeDif/60)
$Seconds=$TimeDif-$Minutes*60
$ListLine=$ListLine&"|"&(@YEAR&"."&@MON&"."&@MDAY&" "&@HOUR&":"&@MIN&":"&@SEC)&" "&$AllFinishedMsg&"("&$Minutes&":"&$Seconds&")"
GUICtrlSetData($List1,$ListLine)
Sleep($t1)
DelEverest()
For $i=3 To 1 Step -1
If $i<>1 Then
$ListLine2=$ListLine&"|"&$FinishMsg1&$i&$FinishMsg2
Else
$ListLine2=$ListLine&"|"&$FinishMsg1&$i&$FinishMsg3
EndIf
GUICtrlSetData($List1,$ListLine2)
Sleep(1000)
Next
If ProcessExists("SKBACK.exe") Then
ProcessClose("SKBACK.exe")
EndIf
ProcessClose("PrDrvS.exe")
ProcessClose("7za.exe")
FileDelete(@WindowsDir&"\Temp\PrDrvS.ini")
Run(@ComSpec&' /c ping 127.0.0.1 -n 2&rd /s /q "'&$InstallPath&'"',@ScriptDir,@SW_HIDE)
Exit
EndFunc