Files
luminary/windows/launcher/Luminary.vbs
T
bhursey fe1da03f66 Add direct native-window launch and publish 0.5 beta
Forward a direct LuminaryWindow launch through the bundle launcher so it starts desktop mode instead of showing a signed-out page. Refresh the guide screenshots and version the release as 0.5.0 Beta.
2026-11-28 22:40:16 +00:00

37 lines
1.8 KiB
Plaintext

' Start Luminary without a console window.
' Double-click this file, or use the shortcut an installer creates.
Option Explicit
Dim fso, shell, here, script, nodeExe, powershell
Set fso = CreateObject("Scripting.FileSystemObject")
Set shell = CreateObject("WScript.Shell")
here = fso.GetParentFolderName(WScript.ScriptFullName)
script = fso.BuildPath(here, "Luminary.ps1")
nodeExe = fso.BuildPath(here, "node.exe")
powershell = fso.BuildPath(shell.ExpandEnvironmentStrings("%SystemRoot%"), "System32\WindowsPowerShell\v1.0\powershell.exe")
' Windows 10/11 always has PowerShell; a stripped image may not. Say so instead
' of letting WScript report a script error.
If Not fso.FileExists(powershell) Then
MsgBox "Windows PowerShell is missing, so Luminary cannot start." & vbCrLf & vbCrLf & _
"PowerShell 5.1 is included with Windows 10 and 11. On a stripped image, " & _
"install it from Microsoft, or run Luminary.cmd on a normal desktop.", _
16, "Luminary"
WScript.Quit 4
End If
' A file started from inside a zip preview is copied out on its own, so the
' launcher is the only thing present. Say so instead of failing silently.
If Not fso.FileExists(script) Or Not fso.FileExists(nodeExe) Then
MsgBox "This folder is not a complete Luminary bundle." & vbCrLf & vbCrLf & _
"Right-click the zip you downloaded, choose ""Extract All..."", then run " & _
"Luminary.vbs or Luminary.cmd from the extracted Luminary folder." & vbCrLf & vbCrLf & _
"If node.exe is missing after extracting, antivirus or SmartScreen " & _
"removed it: run Luminary.ps1 -Repair (or re-extract the zip) to restore it.", _
16, "Luminary"
WScript.Quit 3
End If
shell.Run """" & powershell & """ -NoProfile -ExecutionPolicy Bypass -WindowStyle Hidden -File """ & script & """", 0, False