cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Frenchy
Level 5

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
Labels (1)
0 Kudos
(4) Replies
pv7721
Level 20

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()
0 Kudos
Frenchy
Level 5

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.
0 Kudos
pv7721
Level 20

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...
0 Kudos
Frenchy
Level 5

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.
0 Kudos