Marcus Ataide
Marcus Ataide

Reputation: 7540

Install4j - How to get version of Installer?

I´d like to get the version of the current instalation, I tried:

String myVersion = (String)context.getVariable("sys.version");

However I dont know how to get context.

Upvotes: 1

Views: 257

Answers (1)

Ingo Kegel
Ingo Kegel

Reputation: 48070

In your own code (not in the installer), call

com.install4j.api.launcher.Variables.getCompilerVariable("sys.version")

In the installer (when you have a context), it would be

context.getCompilerVariable("sys.version")

Upvotes: 1

Related Questions