' =========================================================== ' CBE Emulator launcher (VBScript - no console window) ' Double-click to run with embedded plugins, silently. ' =========================================================== Option Explicit Dim shell, fso, javaExe, jar, baseDir, cmd Set shell = CreateObject("WScript.Shell") Set fso = CreateObject("Scripting.FileSystemObject") baseDir = fso.GetParentFolderName(WScript.ScriptFullName) javaExe = baseDir & "\runtime\bin\javaw.exe" jar = baseDir & "\app\cbe-emu.jar" If Not fso.FileExists(javaExe) Then MsgBox "JRE not found at:" & vbCrLf & javaExe, 16, "CBE Emulator" WScript.Quit 1 End If If Not fso.FileExists(jar) Then MsgBox "cbe-emu.jar not found at:" & vbCrLf & jar, 16, "CBE Emulator" WScript.Quit 1 End If ' Collect extra args after the .vbs filename Dim extra extra = "" Dim i For i = 0 To WScript.Arguments.Count - 1 extra = extra & " """ & WScript.Arguments(i) & """" Next ' Build command. 0 = hide window, False = don't wait for return cmd = """" & javaExe & """ -Xmx256m -jar """ & jar & """ " & extra shell.Run cmd, 0, False Set shell = Nothing Set fso = Nothing