Novell is now a part of Micro Focus

Using a Variable to Provide Computer Name to .INI

Novell Cool Solutions: Tip
By Paul Tamborello

Digg This - Slashdot This

Posted: 23 Aug 2000

Current Version: ZENworks 2

A supervisor wanted an application to be deployed to a number of users on NT that runs a service making each workstation the "server" for the application. Unfortunately, the service references an .ini file to find the computer's name.

At first, I thought it would be easy to set up an application that uses a built-in NetWare or ZENworks variable that is the computer's name. Well, after a long search of TID's and newsgroups, I could not find a built in variable for this name I needed.

What I did find, though, was REGREAD (TID 2942990), which allows you to read (from a script) any value from the registry. So what I did was have the app's pre-launch script run the following lines:


"HKLM,SYSTEM\CurrentControlSet\ Control\ComputerName\ ActiveComputerName,ComputerName"


I could then use this variable within the application installation to provide the computer name accurately and dynamically for the .ini file. ZENworks pleasantly surprises me on a daily basis.

If you have any questions you may contact Paul at

Novell Cool Solutions (corporate web communities) are produced by WebWise Solutions.

© Copyright Micro Focus or one of its affiliates