Option Explicit Dim fso, DestPath, DrvFolder, SourceFolder, id Set fso=CreateObject("Scripting.FileSystemObject") DestPath = ExpandPath("%TEMP%") DrvFolder = DestPath & "\" & "kvaziDVD" SourceFolder = ExpandPath("%ProgramFilesDir%\MakBit Virtual CD-DVD\kvaziDVD") Function OnFirstSandboxOwner fso.CopyFolder SourceFolder, DestPath & "\" id=ExecuteExternalProcess(chr(34) & DrvFolder & "\loader.exe" & chr(34) & " kvazidvd " & chr(34) & DrvFolder & "\kvazidvd.sys" & chr(34)) WaitForProcess id, 0 End Function Function OnLastProcessExit id = ExecuteExternalProcess(chr(34) & DrvFolder & "\loader.exe" & chr(34) & " kvazidvd delete") WaitForProcess id, 0 fso.DeleteFolder DrvFolder End Function |