Creating setup wizard to check for java installation, and run a executable jar file

Hello, We are wanting to make an exe file, a setup wizard that will be downloaded by users of our website. (A plugin of sorts). What we want this plugin to do is look to see if java is installed first, and if not install it, then run an executable jar file which will set a registration key. Is there a program, or any website that will help us out with doing this? Thank-you
cwitr329Asked:
Who is Participating?
 
basicinstinctCommented:
What about something like this:
(copy the code below, paste it into an empty text file, save as jhome.vbs and run it)

'Start code
Set WSHNetwork = WScript.CreateObject("WScript.Network")
Set shell = WScript.CreateObject( "WScript.Shell" )
jhome = shell.ExpandEnvironmentStrings("%JAVA_HOME%")
If jhome = "%JAVA_HOME%" OR jhome = "" Then
      'Run your installer by adding the path to it in place of "notepad"
      'eg "C:\whatever\yourinstallername.exe"
      shell.Run "notepad"
Else
      MsgBox "Java is installed.  Java home is: " + jhome      
End If
'end code

BTW - can you run a jar file if Java is not installed?
0
 
cwitr329Author Commented:
Hello, Thanks for the help. A jar file cannont be installed if java isnt there, that is why we are trying to make a plugin that first checks if java is installed, if its not then it installs it. Then runs the jar file. If need be, not sure, the user might have to restart then the jar file will run on startup? Not sure, trying to find a solution. Anyone?
0
 
cwitr329Author Commented:
Also, it doesnt have to be an exe, just something they can download from our site, and run...
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.