Skip to content

Commit

Permalink
Handle error when the exe is not at the expected path
Browse files Browse the repository at this point in the history
  • Loading branch information
andrews05 committed Mar 14, 2024
1 parent b74bba1 commit 5d2d2be
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions release/TC Launcher (copy to TC folder).vbs
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,13 @@ On Error Resume Next
Set shell = CreateObject("WScript.Shell")
evn = shell.RegRead("HKCU\Software\Microsoft\Windows\CurrentVersion\App Paths\EV Nova.exe\")

If err.number = 0 Then
shell.Run """" & evn & """"
End If

If err.number <> 0 Then
response = MsgBox("EV Nova Community Edition r3 or newer is required to use this script." & vbCrLf & vbCrLf & "If you already have this version, try launching it once from its current location before continuing. If you don't have it yet you can download it from:" & vbCrLf & "https://github.com/andrews05/EV-Nova-CE" & vbCrLf & vbCrLf & "Would you like to download EV Nova CE now?", vbYesNo Or vbCritical Or vbDefaultButton2, "Unable to locate EV Nova.exe")
If response = vbYes Then
shell.Run "https://github.com/andrews05/EV-Nova-CE"
End If
WScript.Quit 1
End If

shell.Run """" & evn & """"

0 comments on commit 5d2d2be

Please sign in to comment.