Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I will need to package an older java application with it's dependencies on Windows which are quite a lot. I've exported a runnable .jar and got the depending native libraries, but still I need to make sure prerequisites are installed like:

  1. JDK6 or at least JRE6 (with environment PATH variable pointing to the bin directory)
  2. Quicktime
  3. WinVDIG

I don't have a lot of experience with batch files or installers on windows so could use some help.

I see some people make bundles (like Zigfu for example which installs OpenNI/NITE/Drivers and sets environment variables). Is it easy to make those ? If so, how ? They look 'clean'/easier to the typical user.

I presume a batch file might be easier, right ? Can I check when a package finished installing and set/check environment variables ? If so, how ?


share|improve this question

JRE Install

:: Java Begin
START /WAIT %cd%\JRE16\jre-6u30-windows-i586.exe /s ADDLOCAL=jrecore IEXPLORER=1 MOZILLA=0 JAVAUPDATE=0 AUTOUPDATECHECK=0 REBOOT=ReallySuppress
IF EXIST "%PUBLIC%\Desktop\Java Web Start.LNK" DEL "%PUBLIC%\Desktop\Java Web Start.LNK"
IF EXIST "%ALLUSERSPROFILE%\Start Menu\Programs\Java Web Start\Java Web Start.LNK" RD /Q /S "%ALLUSERSPROFILE%\Start Menu\Programs\Java Web Start"
IF EXIST "%ALLUSERSPROFILE%\Microsoft\Windows\Start Menu\Programs\Java Web Start\Java Web Start.LNK" RD /Q /S "%ALLUSERSPROFILE%\Microsoft\Windows\Start Menu\Programs\Java Web Start"
:: Java Configure on x86 systems
REG ADD "HKLM\SOFTWARE\JavaSoft\Java Plug-in\1.6.0_24" /v HideSystemTrayIcon /t REG_DWORD /d 1 /f
REG ADD "HKLM\SOFTWARE\JavaSoft\Java Update\Policy" /v EnableJavaUpdate /t REG_DWORD /d 0 /f
REG ADD "HKLM\SOFTWARE\JavaSoft\Java Update\Policy" /v EnableAutoUpdateCheck /t REG_DWORD /d 0 /f
REG ADD "HKLM\SOFTWARE\JavaSoft\Java Update\Policy" /v NotifyDownload /t REG_DWORD /d 0 /f
REG ADD "HKLM\SOFTWARE\JavaSoft\Java Update\Policy" /v NotifyInstall /t REG_DWORD /d 0 /f
REG DELETE "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run" /v SunJavaUpdateSched /f
:: Java End

speedup java:

java -Xshare:dump


QuickTimeInstaller.exe /extract

silent install msi

How to set up a silent install of QuickTime through a batch script


WinVDIG download

Inno Setup Unpacker info

Inno Setup Unpacker download

unpack WinVDIG:

innounp.exe -x WinVDIG_101.exe

see install_script.iss

write copy file script, or create msi

Not use Java in environment PATH!

Oh, install 8-10 java VM and test java env ... it not work.

Use %APPDATA%\Sun\Java\Deployment\


get your java, set path at cmd, run JVM

JDK registry powershell

powershell gci 'hklm:\SOFTWARE\JavaSoft\Java Development Kit'-rec^|gp^|select JavaHome

JRE registry powershell

powershell gci 'hklm:\SOFTWARE\JavaSoft\Java Runtime Environment'-rec^|gp^|select JavaHome

Java Webstart registry powershell

powershell gci 'hklm:\SOFTWARE\JavaSoft\Java Web Start'-rec^|gp^|select Home

JVM 64:

dir /A:D /B %ProgramFiles%\Java

JVM 32:

dir /A:D /B %ProgramFiles(x86)%\Java
share|improve this answer
oh wow! this is impressive (+1) – George Profenza Mar 4 '13 at 13:26

I wouldn't recommend batch files in this case. They're likely to become quite complicated and there's not much use when better solutions are available.

You can use an installation system/installer creator such as NSIS or Inno Setup (lots more listed here) to create a simple installer that packages all the individual installers together. Your master installer can extract the files, run each installer in turn (preferably using switches that will allow you to perform a silent/unattended installation), then set environment variables as required and do whatever else you want such as modifying the registry, moving files and so on, before finally cleaning up.

It shouldn't be all that difficult, and there are lots of pre-made installation scripts available. Push comes to shove you can even create a bare bones SFX installer using an archiver such as 7-Zip or WinRAR.

share|improve this answer
I had a look at NSIS which has a nice eclipse plugin, trying to work out how to run other installers in the background and setting java\bin to the PATH environment variable – George Profenza Mar 4 '13 at 13:27

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.