poidasmith / winrun4j

WinRun4J Java Application Launcher
http://winrun4j.sourceforge.net
212 stars 63 forks source link

Question regarding : Override ini values via commandline #12

Closed schwitters closed 11 years ago

schwitters commented 12 years ago

I'am looking for a possibility to override values via a commandline, which are set or not set in the inifile.

Consider the following usecase:

Usually i omit setting the ini value 'vm.location=' and let winrun4j detect the suitable vm. This works fine.

In some situations my users would like to set 'vm.location=' to a dedicated location (or even another key to another value). They have to preprocess and modify the ini file. But thats no solution.

My approach would be to introduce something like --WinRun4J:SetIniParam::vm.location=C:\whatever

Are there better solutions than patching WinRun4J.cpp ?

poidasmith commented 12 years ago

One way to achieve this would be to use an override INI file or registry location. Take a look at the keys 'ini.file.location', 'ini.registry.location' and 'ini.override' at http://winrun4j.sourceforge.net/ in the Usage table.

This would allow your users to specify extra INI key/values in an alternative file or in the registry.

poidasmith commented 11 years ago

The latest release (0.4.5) adds the ability to override INI keys via the command line.