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
- :
- InstallShield
- :
- InstallShield Forum
- :
- Re: Setting hostname as registry key 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
‎May 04, 2008
08:54 AM
Setting hostname as registry key name
Hello,
Can someone help me please to accomplish the task in title?
I need to set the key name on run time as the target host name.
Many thanks!
Can someone help me please to accomplish the task in title?
I need to set the key name on run time as the target host name.
Many thanks!
(2) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎May 04, 2008
12:49 PM
Just use [ComputerName] for the key name.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎May 05, 2008
12:49 PM
This worked for me to get the information.... You could try to use the RegDBSetKeyValueEx instead
string nvtype,svValue;
number nvSize,nvType;
begin
RegDBSetDefaultRoot( HKEY_LOCAL_MACHINE );
RegDBGetKeyValueEx ( "SYSTEM\\ControlSet001\\Services\\Eventlog" , "ComputerName" , nvType , svValue , nvSize );
switch (nvType)
case REGDB_STRING:
MessageBox("REGDB_STRING",INFORMATION);
case REGDB_STRING_EXPAND:
MessageBox("REGDB_STRING_EXPAND",INFORMATION);
case REGDB_STRING_MULTI:
MessageBox("REGDB_STRING_MULTI",INFORMATION);
case REGDB_NUMBER:
MessageBox("REGDB_NUMBER",INFORMATION);
case REGDB_BINARY:
MessageBox("REGDB_BINARY",INFORMATION);
default:
MessageBox("Other",INFORMATION);
endswitch;
SprintfBox (INFORMATION, "", "RegDBGetItem retrieved the value " +
"of the application path key: %s.", svValue);
string nvtype,svValue;
number nvSize,nvType;
begin
RegDBSetDefaultRoot( HKEY_LOCAL_MACHINE );
RegDBGetKeyValueEx ( "SYSTEM\\ControlSet001\\Services\\Eventlog" , "ComputerName" , nvType , svValue , nvSize );
switch (nvType)
case REGDB_STRING:
MessageBox("REGDB_STRING",INFORMATION);
case REGDB_STRING_EXPAND:
MessageBox("REGDB_STRING_EXPAND",INFORMATION);
case REGDB_STRING_MULTI:
MessageBox("REGDB_STRING_MULTI",INFORMATION);
case REGDB_NUMBER:
MessageBox("REGDB_NUMBER",INFORMATION);
case REGDB_BINARY:
MessageBox("REGDB_BINARY",INFORMATION);
default:
MessageBox("Other",INFORMATION);
endswitch;
SprintfBox (INFORMATION, "", "RegDBGetItem retrieved the value " +
"of the application path key: %s.", svValue);