l2j_mobius/L2J_Mobius_C1_HarbingersOfWar/dist/AccountManager.vbs
2022-08-04 06:26:59 +00:00

19 lines
598 B
Plaintext

'Get Java path.
Dim path
Set shell = WScript.CreateObject("WScript.Shell")
path = shell.Environment.Item("JAVA_HOME")
If path = "" Then
MsgBox "Could not find JAVA_HOME environment variable!", vbOKOnly, "Account Manager"
Else
If InStr(path, "\bin") = 0 Then
path = path + "\bin\"
Else
path = path + "\"
End If
path = Replace(path, "\\", "\")
path = Replace(path, "Program Files", "Progra~1")
End If
'Run the installer.
shell.Run "cmd /c start ""L2J Mobius - Account Manager"" " & path & "java -cp Server.jar org.l2jmobius.tools.accountmanager.AccountManager", 1, False