This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallAnywhere
- :
- InstallAnywhere Forum
- :
- Re: get system env variable
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Dec 19, 2011
03:10 PM
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???
the windows environment, but where is the Action to Get a system environment variable???
(5) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Dec 20, 2011
01:19 AM
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
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
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Dec 20, 2011
07:46 AM
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.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Dec 22, 2011
01:49 AM
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$.
$lax.nl.env.SYSTEM_ENV_VARIABLE_NAME$.
For example, to get JAVA_HOME we have to use $lax.nl.env.JAVA_HOME$.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jan 04, 2012
01:19 PM
thanks for the reply, I will give it a try.
BTW where are the $lax.nl.env.???$. variables documented?
BTW where are the $lax.nl.env.???$. variables documented?
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jan 05, 2012
12:38 AM
lax.nl.env.variable_name and lax.nl.env.exact_case.variable_name properties can be used to access any system environment variable.
Below article provides more information on LAX variables.
http://kb.flexerasoftware.com/selfservice/microsites/search.do?cmd=displayKC&docType=kc&externalId=IA2011-Content-helplibrary-iarefvariableslaxpropertieshtm&sliceId=&docTypeID=DT_MACROVISIONHELPNET_1_1&dialogID=121581850&stateId=0%200%20121577888
Regards
SunnyBoy
Below article provides more information on LAX variables.
http://kb.flexerasoftware.com/selfservice/microsites/search.do?cmd=displayKC&docType=kc&externalId=IA2011-Content-helplibrary-iarefvariableslaxpropertieshtm&sliceId=&docTypeID=DT_MACROVISIONHELPNET_1_1&dialogID=121581850&stateId=0%200%20121577888
Regards
SunnyBoy