Thursday 28 February 2019

installation - installer script for multiple software packages


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 ?


Thanks!



Answer



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 "%ALLUSERSPROFILE%\Desktop\Java Web Start.LNK" DEL "%ALLUSERSPROFILE%\Desktop\Java Web Start.LNK"
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

Quicktime:


QuickTimeInstaller.exe /extract

silent install msi


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


WinVDIG:


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



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


Use %APPDATA%\Sun\Java\Deployment\deployment.properties


deployment.javaws.jre.0.path=C\:\\App32\\Java\\jre6\\bin\\javaw.exe

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

No comments:

Post a Comment

How can I VLOOKUP in multiple Excel documents?

I am trying to VLOOKUP reference data with around 400 seperate Excel files. Is it possible to do this in a quick way rather than doing it m...