007Alex007
Junior Member | Редактировать | Профиль | Сообщение | Цитировать | Сообщить модератору Option Explicit Dim fso, SourcePath, MyProgPath, MyProgSource1, MyProgSource2, MyProgSource3, MyProgSource4, MyProgSource5, MyProgDest1, MyProgDest2, MyProgDest3, MyProgDest4, MyProgDest5, id, ib Function OnFirstSandboxOwner Set fso = CreateObject("Scripting.FileSystemObject") SourcePath = ExpandPath("%SystemRoot%") MyProgPath = ExpandPath("%drive_C%\UltraISO1\drivers") MyProgSource1 = MyProgPath & "\Install.bat" MyProgSource2 = MyProgPath & "\Remove.bat" MyProgSource3 = MyProgPath & "\IsoCmd.exe" MyProgSource4 = MyProgPath & "\ISODrive.sys" MyProgSource5 = MyProgPath & "\ISODrv64.sys" MyProgDest1 = SourcePath & "\Install.bat" MyProgDest2 = SourcePath & "\Remove.bat" MyProgDest3 = SourcePath & "\IsoCmd.exe" MyProgDest4 = SourcePath & "\ISODrive.sys" MyProgDest5 = SourcePath & "\ISODrv64.sys" If not fso.FileExists(MyProgDest1) then fso.CopyFile MyProgSource1, MyProgDest1 End If If not fso.FileExists(MyProgDest2) then fso.CopyFile MyProgSource2, MyProgDest2 End If If not fso.FileExists(MyProgDest3) then fso.CopyFile MyProgSource3, MyProgDest3 End If If not fso.FileExists(MyProgDest4) then fso.CopyFile MyProgSource4, MyProgDest4 End If If not fso.FileExists(MyProgDest5) then fso.CopyFile MyProgSource5, MyProgDest5 End If id = ExecuteExternalProcess("C:\WINDOWS\Install.bat") WaitForProcess id, 0 End Function Function OnLastProcessExit id = ExecuteExternalProcess("C:\WINDOWS\Remove.bat") WaitForProcess id, 0 If fso.FileExists(MyProgDest1) Then fso.DeleteFile(MyProgDest1) End if If fso.FileExists(MyProgDest2) Then fso.DeleteFile(MyProgDest2) End if If fso.FileExists(MyProgDest3) Then fso.DeleteFile(MyProgDest3) End if If fso.FileExists(MyProgDest4) Then fso.DeleteFile(MyProgDest4) End if If fso.FileExists(MyProgDest5) Then fso.DeleteFile(MyProgDest5) End if End Function | Всего записей: 138 | Зарегистр. 18-04-2008 | Отправлено: 22:32 26-03-2015 | Исправлено: 007Alex007, 23:11 26-03-2015 |
|