Hi all,
Is there any easy way to get the name of the localhost using installshield (6.3). This could be accomplished by reading the %computername% environment variable but i haven't come across a way of doing this..
Cheers,
This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.
Getting the local host name
Started by
dkenny
, May 23 2002 13:49
6 replies to this topic
Posted 23 May 2002 - 14:21
Doh!
Got it.. Registry.
SYSTEM\\CurrentControlSet\\Control\\Session Manager\\Environment";
My head isn't properly screwed on today.
Got it.. Registry.
SYSTEM\\CurrentControlSet\\Control\\Session Manager\\Environment";
My head isn't properly screwed on today.
Posted 24 May 2002 - 11:37
No, sorry. You haven't. On my NT machine there is no entry for the computername in the registry at the place you noted. Use the String Value of "ComputerName" in the key
"HKLM\SYSTEM\CurrentControlSet\Control\ComputerName\ComputerName"
instead.
"HKLM\SYSTEM\CurrentControlSet\Control\ComputerName\ComputerName"
instead.
h.teichert-ott
Posted 24 May 2002 - 16:03
There's an API function called GetComputerName which you can call from Kernel32.dll or so. This function gives you the current computer name.
Regards,
Marko
Regards,
Marko
Posted 05 June 2002 - 17:25
function GetLocalHostName()
NUMBER nSize;
begin
nSize = 256;
MsiGetProperty(ISMSI_HANDLE, "ComputerName", szHostName, nSize);
end;
NUMBER nSize;
begin
nSize = 256;
MsiGetProperty(ISMSI_HANDLE, "ComputerName", szHostName, nSize);
end;
Posted 10 June 2002 - 10:40
The answer of VVorontsov doesn't apply to Installshield 6. MSIGetProperty is a windows installer function and doesn't exist on IS6.
h.teichert-ott