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.
77 lines
2.1 KiB
Plaintext
77 lines
2.1 KiB
Plaintext
Option Explicit
|
|
Dim wshshell,fso,i,Fnct
|
|
Dim strPath,strSystemFolder,strWinFolder,strTempFolder
|
|
|
|
'----------------------------- Objekte erzeugen --------------------------------
|
|
i = 0
|
|
On Error Resume Next
|
|
Do
|
|
err.Clear
|
|
i = i+1
|
|
Set wshshell = CreateObject("WScript.Shell")
|
|
Set fso = CreateObject("Scripting.FileSystemObject")
|
|
Set Fnct = CreateObject("Install.Functions")
|
|
WScript.Sleep 1000
|
|
Loop Until Err.Number = 0 OR i > 30
|
|
|
|
If Err.Number <> 0 Then
|
|
WScript.Quit
|
|
End If
|
|
|
|
On Error Goto 0
|
|
|
|
'--------------------------- Standardpfade -------------------------------------
|
|
strPath = GetCurrentPath()
|
|
strSystemFolder = fso.GetSpecialFolder(1) & "\"
|
|
strWinFolder = fso.GetSpecialFolder(0) & "\"
|
|
strTempFolder = fso.GetSpecialFolder(2) & "\"
|
|
|
|
|
|
'------------------------------ Main -------------------------------------------
|
|
Dim strLogFile,strTemp,LogFile,bResult,strMsiFile,strText,strMainVolume,strComputerIni
|
|
|
|
strMainVolume = ExpandPath("%MAIN_VOLUME%","c:\")
|
|
strComputerIni = strMainVolume & "Computer.ini"
|
|
|
|
If(Fnct.GetIniString("CD1_Setup","Firewall",strComputerIni) = "1") Then
|
|
wscript.quit
|
|
End If
|
|
|
|
wshshell.Run(GetCurrentPath() & "Q835732_XPe_Sasser.exe /S /v /qn")
|
|
WScript.Sleep(60*1000)
|
|
|
|
|
|
'------------------------------- Funktionen ------------------------------------
|
|
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
|
|
|
|
Function ExpandPath(p_strEnvironment,p_strDefault)
|
|
Dim l_strTemp
|
|
l_strTemp = wshshell.ExpandEnvironmentStrings(p_strEnvironment)
|
|
If l_strTemp = p_strEnvironment Then
|
|
l_strTemp = p_strDefault
|
|
End If
|
|
ExpandPath = l_strTemp
|
|
End Function
|
|
|
|
Sub WaitLoop(p_strAppText, p_nTimeout)
|
|
Dim Timeout
|
|
|
|
Timeout = 0
|
|
Do Until wshshell.AppActivate(p_strAppText)
|
|
WScript.Sleep (100)
|
|
Timeout = Timeout + 0.1
|
|
If Timeout >= p_nTimeout Then
|
|
WScript.Quit
|
|
End If
|
|
Loop
|
|
WScript.Sleep (1000)
|
|
wshshell.AppActivate(p_strAppText)
|
|
End Sub
|