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: InstallAnywhere variable for Computer name?
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
‎Jul 23, 2010
11:13 AM
InstallAnywhere variable for Computer name?
What is the InstallAnywhere variable for Computer name? I am looking for something like $USER_INSTALL_DIR$ that I can replace at run-time that will translate into the computer name. There is a windows property called 'ComputerName', but I do not know how to access it. From searching I see that we can use something like
$lax.nl.env.ENVIRONMENT_VARIABLE_NAME$
Would $lax.nl.env.ComputerName$ work?
any help would be greatly appreciated. Thanks
$lax.nl.env.ENVIRONMENT_VARIABLE_NAME$
Would $lax.nl.env.ComputerName$ work?
any help would be greatly appreciated. Thanks
(4) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jul 23, 2010
01:47 PM
You could use a very simple custom code in order to let Java try get the Hostname (I guess this is what you would need): you could use InetAddress.getLocalHost().getHostName()
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jul 23, 2010
01:59 PM
thank for the help, if I have to use custom code i will but I would think that there would be some IA variable set at run time that would have this information.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jul 23, 2010
02:47 PM
Well, according to this link there is: http://kennethhunt.com/archives/000933.html
I've tried %COMPUTERNAME% under Windows XP and it works... not sure about newer Windows versions, you'll need to try...
I've tried %COMPUTERNAME% under Windows XP and it works... not sure about newer Windows versions, you'll need to try...
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jul 23, 2010
03:25 PM
Thanks for your help. Yes it does work. The environment varible just needs to be in all CAPS.
$lax.nl.env.COMPUTERNAME$
Works. thanks again.
$lax.nl.env.COMPUTERNAME$
Works. thanks again.