You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
46 lines
950 B
Plaintext
46 lines
950 B
Plaintext
Option Explicit
|
|
|
|
Dim wshshell
|
|
Dim fso
|
|
Dim Dlg
|
|
Dim Key,i
|
|
Const cstrIniFile = "C:\Computer.ini"
|
|
|
|
i = 0
|
|
On Error Resume Next
|
|
Do
|
|
err.Clear
|
|
i = i+1
|
|
Set wshshell = CreateObject("WScript.Shell")
|
|
Set fso = CreateObject("Scripting.FileSystemObject")
|
|
WScript.Sleep 1000
|
|
Loop Until Err.Number = 0 OR i > 30
|
|
|
|
If Err.Number <> 0 Then
|
|
WScript.Quit
|
|
End If
|
|
key = "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run\VbStart"
|
|
wshshell.RegDelete key
|
|
|
|
Err.Clear
|
|
On Error Goto 0
|
|
|
|
|
|
|
|
Call wshshell.Run(GetCurrentPath()&"ExitIns3.vbs")
|
|
|
|
Set Dlg = CreateObject("Install.PermanentDlg")
|
|
Dlg.Caption = "Installation"
|
|
Call Dlg.SetLine(0, "Please insert the")
|
|
Call Dlg.SetLine(1, "SaveAndRestore disk!")
|
|
Dlg.Show
|
|
|
|
Function GetCurrentPath()
|
|
Dim l_strScriptName
|
|
Dim l_strTemp
|
|
|
|
l_strScriptName = WScript.ScriptFullName
|
|
l_strTemp = WScript.ScriptName
|
|
GetCurrentPath = Left(l_strScriptName, Len(l_strScriptName) - Len(l_strTemp))
|
|
End Function
|