-
get system env variable
You can set a system environment variable, and you can refresh the
the windows environment, but where is the Action to Get a system environment variable???
-
Get a system environment variable can be retrieved using getEnvironmentVariable() method this is present in SystemUtilService Interface. This Interface performs system-level operations.
getRawEnvironmentVariable
java.lang.String getRawEnvironmentVariable(java.lang.String variableName, int level) throws ServiceException
This method is useful to developers when creating a custom bean. Gets the raw value of the specified environment variable. For operating systems whose environment variable settings are script-controlled, this returns the value of the environment variable from the InstallShield section of the script. For other operating systems, this method acts the same as getEnvironmentVariable . The returned value may contain references to environment variables that are not resolved.
Parameters:
variableName - - The name of the variable for which to return a value.
level - - Specifies the level of the environment variable. This parameter may be ignored on platforms which do not support the setting of environment variables at different levels (e.g., Win9x).
Returns:
A string containing the value of the environment variable; null if the environment variable does not exist
Regards
SunnyBoy
-
thanks for the quick response. I was hoping for an InstallAnywhere Action from the Add Action panel. I just found it somewhat limited that a Set action is provided without the corresponding Get action.
-
get system env variable
InstallAnywhere has an action to get environment variables. We can use
$lax.nl.env.SYSTEM_ENV_VARIABLE_NAME$.
For example, to get JAVA_HOME we have to use $lax.nl.env.JAVA_HOME$.
-
thanks for the reply, I will give it a try.
BTW where are the $lax.nl.env.???$. variables documented?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules