Skip to content
⌘ NSIS Forum Archive

How do I get the hostname of the machine running the installer

4 posts

RichD#

How do I get the hostname of the machine running the installer

Hi,

I need to be able to get the hostname of the machine running my installer application. I have seen the IPdll plugin, but can't see how I can get the hostname. Can anyone help?

Regards,
Rich.
zarged#
For windows 2k or XP you can read the registry for the following key which gives the hostname:

HKLM\System\CurrentControlSet\Control\ComputerName\

Not sure of the difference between ComputerName and ActiveComputerName as they always seem to be the same.
kichik#
You can also use this:

Are you a developer who uses NSIS to distribute your application? Are you a Winamp plug-in developer who wants to use NSIS to distribute your plug-in? Have suggestions for other people like you? This is the place.
RichD#
Thanks for this - we need to work with pre-win 2k, but the second solution works for me.

Thanks,
Rich.