34 lines
1.3 KiB
Plaintext
34 lines
1.3 KiB
Plaintext
|
|
' HMS MediaEngine - Erstinstallation (Windows, Doppelklick)
|
||
|
|
' Oeffnet den grafischen Installer (Fenster, kein Tippen noetig).
|
||
|
|
Option Explicit
|
||
|
|
Dim fso, sh, py, cand, dir_, candidates
|
||
|
|
Set fso = CreateObject("Scripting.FileSystemObject")
|
||
|
|
Set sh = CreateObject("WScript.Shell")
|
||
|
|
dir_ = fso.GetParentFolderName(WScript.ScriptFullName)
|
||
|
|
|
||
|
|
py = ""
|
||
|
|
On Error Resume Next
|
||
|
|
candidates = Array( _
|
||
|
|
sh.ExpandEnvironmentStrings("%LOCALAPPDATA%") & "\Programs\Python\Python313\pythonw.exe", _
|
||
|
|
sh.ExpandEnvironmentStrings("%LOCALAPPDATA%") & "\Programs\Python\Python312\pythonw.exe", _
|
||
|
|
"C:\Python313\pythonw.exe", _
|
||
|
|
"C:\Python312\pythonw.exe")
|
||
|
|
For Each cand In candidates
|
||
|
|
If py = "" Then
|
||
|
|
If fso.FileExists(cand) Then py = cand
|
||
|
|
End If
|
||
|
|
Next
|
||
|
|
On Error GoTo 0
|
||
|
|
|
||
|
|
If py = "" Then
|
||
|
|
MsgBox "Python fehlt noch." & vbCrLf & vbCrLf & _
|
||
|
|
"Der Browser oeffnet jetzt die offizielle Python-Downloadseite." & vbCrLf & _
|
||
|
|
"Nach der Python-Installation (Haeckchen bei 'Add python.exe to PATH'!)" & vbCrLf & _
|
||
|
|
"bitte HMS-Install.vbs erneut doppelklicken.", 64, "HMS MediaEngine"
|
||
|
|
sh.Run "cmd /c start https://www.python.org/downloads/", 0, False
|
||
|
|
WScript.Quit 1
|
||
|
|
End If
|
||
|
|
|
||
|
|
sh.CurrentDirectory = dir_
|
||
|
|
sh.Run Chr(34) & py & Chr(34) & " " & Chr(34) & dir_ & "\installer_gui.py" & Chr(34), 1, False
|