Skip navigation

Reader to Reader - April 1999

\[Editor's Note: Share your NT discoveries, comments, problems, solutions, and experiences with products and reach out to other Windows NT Magazine readers (including Microsoft). Email your contributions (400 words or less) to [email protected]. Please include your phone number. We will edit submissions for style, grammar, and length. If we print your letter, you'll get $100.\]


NT Group Renaming
If you're a Windows NT domain administrator, you know that you can't rename a group under NT. (Although you can rename a group by copying it under a new name, you lose the internal security ID—SID—that numerous access control lists—ACLs—on files and folders refer to.) User Manager for Domains doesn't let you rename groups because of interoperability problems between OS/2 LAN Manager, DOS LAN Manager, IBM LAN Server, and Windows for Workgroups (WFW). For information about these problems, see the Microsoft articles "Windows NT Global Groups Are Limited to 20 Character Names" and "User Manager Cannot Rename a Group" at http://support.microsoft.com/support/c.asp. If you don't have to rely on these systems, you can use the LAN Manager API to rename NT groups.

The NetGroupSetInfo (for global groups) and NetLocalGroupSetInfo (for local groups) LAN Manager APIs let you rename NT groups. The Visual Basic (VB) 5.0 code in Listing 1, page 28, shows how to use these API calls. Use this code in a new VB standard project with one command button. Insert your own values under the command-button code. You must run the code on an NT machine, because most LAN Manager APIs are available only on NT. To guarantee compatibility with User Manager for Domains, you need to limit the group name length to 20 characters.


Command Prompt During NT Installation
Having a command prompt available during a Windows NT installation is useful. For example, you might need to use the Ping command to test connectivity or to copy files or drivers onto the hard disk. You might also want to use the Nbtstat command to check how NT interprets an imported LMHOSTS file or to verify whether NetBIOS is passing through a router.

You can bring up a command prompt at the network configuration portion of an NT installation. In the network configuration, under TCP/IP Properties, select the WINS Address tab. Select the Enable LMHOSTS check box, and click Import LMHOSTS. Select \winnt\system32\cmd.exe, and click Open. A command prompt appears. Then, you can use the Next and Back options in the NT installation dialog boxes to go forward or backward through the installation process.


Resizing Columns Even More Quickly
In response to Gilford Grijt, "Quickly Resize Your Columns," (Reader to Reader, November 1998), I have an even quicker way to simultaneously resize columns under Windows NT 4.0 or Windows 95 rather than double-clicking all the column dividers individually. Make sure the window containing the columns is the active window, and press Ctrl+Alt+Num+. All the columns will resize automatically.


NumLock
When you install or configure Windows NT, you can't set NumLock to come on and stay on. You might think Control Panel offers a setting for this function—but it doesn't. In addition, I can't find this information in any NT books or magazines, at any NT seminars, or in the Microsoft Windows NT 4.0 Resource Kit. I did some hacking and finally found the Registry key that controls NumLock. Start a Registry editor, and go to HKEY_CURRENT_USER/Control Panel/Keyboard/InitialKeyboardIndicators. Set the value to 2. NumLock then comes on and stays on.


Redundancy in Outlook 98
I recently started a new job and spent the first week following my boss around the company troubleshooting Microsoft Outlook 98 problems. Our users were receiving error messages notifying them that they couldn't send or receive email because they were close to or had reached their folder-size limit. At first, we deleted messages from users' Deleted Items and Sent Items folders, which freed up enough disk space to let them send and receive email. To calculate how close users were to their limits, we right-clicked the Inbox, selected Properties, and selected Folder Size. After we determined the size of the Inbox folder and its subfolders, we added the sizes manually.

Fortunately, I had some spare time to go back to my workstation and experiment with Outlook 98 to find the problem. I discovered that I could right-click the top folder (i.e., Mailbox - username), select Properties, and select Folder Size to view a larger list of folders than just those under the Inbox. I quickly noticed that my Journal folder's size was huge. (None of the company's employees use the Journal folder.)

I selected Tools, Options from Outlook 98's main menu, and opened the Preferences tab. When I looked at Journal Options, I found that the Journal had been recording every email message with an attachment. Although the Automatically record these items: check box was clear, the option below it, Also record items from:, had a check next to each application I had ever received as an attachment.

I reinstalled Outlook 98 and rechecked the Journal Options. Because I hadn't yet received an email message with an attachment on this installation, the Also record items from: check box was clear.

When I rechecked users' systems, I discovered that some longtime users' Journal folders had stored thousands of emails with attachments (e.g., Microsoft Word, Microsoft Excel, Microsoft Access, PowerPoint). These messages were eating up tons of space in the users' mailboxes and were causing the folder-size limit error messages.

I checked my home computer and found the same problem, with more than 2000 entries in my Journal that I had to delete. I remembered that my previous employer, for whom my wife still worked, had never placed a limit on mailbox size and had been continually asking users to delete messages from their Inboxes in the months before I left because the server space was maxing out. I told my wife to check her Journal size, and sure enough—Outlook 98 had automatically recorded every email message with an attachment. No wonder the company was running out of disk space.

Because you can use other folders (e.g., Sent Items, Deleted Items, folders you create) to keep track of messages, having the Journal option automatically record messages is redundant. I consider this default lame on Microsoft's part. Perhaps it's simple overkill, but it seems like a real bug. I wonder how many other companies have the same problem and don't know it. (For a similar problem with Outlook Express, see Mark Minasi, En Garde, "Relearning Lessons," November 1998.)


Excel Tip
When you use Microsoft Excel's VLookup function to look up values in a spreadsheet column, be sure to include the false switch as part of the parameter. Using this switch prevents erroneous numbers from appearing. This trick is especially important if you're performing a lookup from a spreadsheet with more than 1000 line entries, because keeping track of the entries is virtually impossible.


SP4 Bug?
When I installed Service Pack 4 (SP4) on my Windows NT 4.0 system, the service pack destroyed all the information on one of my Zip disks. SP4 stored the information in a subdirectory that it created (found.000). I had to reinstall NT to get my system to work again, but I can't recover the lost information. I'm wondering whether a recovery tool exists to restore *.chk files. Until I find one, I plan to wait until SP4 is available on the TechNet CD-ROM before I install it again.

Resource Kit's Service Installation Wizard
The Microsoft Windows NT Server 4.0 Resource Kit's Service Installation Wizard, srvinstw.exe, is a utility that provides an easy method for installing or deleting services and device drivers on local and remote computers. However, you need to know a couple of tricks to use the utility for installing services on remote computers.

You need domain administrator privileges to run srvinstw.exe. In addition, all files and directory paths must be relative to the target computer. After you install the utility, you simply follow the steps in the dialog boxes to install the service. However, you need to pay particular attention to the fourth and sixth dialog boxes.

In the fourth dialog box, you receive the message Please enter the full path to the executable file. The path and file must be a local drive on the system. This message tells you that you need to specify a full path to the service's executable file on the target computer rather than on the computer you're using for the installation. For example, to install the Remote Console Server service, you need to enter

c:\winnt\system32\rconsvc.exe

In the sixth dialog box, you receive the message Please select the security credentials that the service will run under. 1) Install a service as local system account; 2) Account with administrator privilege. This message tells you to configure the service to run as a local system account or to specify an existing account in your Domain Admins group. If you specify a Domain Admins account, the account will have the Logon as a service right and will be part of the local Administrator group. Thus, the service can access resources on other computers in the domain. (In the case of Remote Console Server, you don't need this access; thus, you can choose the first option and not select the Allow Service to interact with Desktop check box.)

When the installation completes, you receive the message The service was successfully installed. You might think you can start the service. However, the Service Installation Wizard doesn't automatically copy the necessary files to the target computer. You must manually copy the essential files to the directory you specified in the fourth dialog box. For example, to run the Remote Console Server service you need to copy all the files under the resource kit's Rconsole directory (i.e., rconsvc.exe, rcruncmd.exe, rcongrp.exe, rconmode.exe, rconmsg.dll, and rconstat.exe) to the target computer.

To copy the files, you can map a share on the target computer as your local drive and copy the files to the target computer. If the target computer doesn't have a share, you can use the resource kit Rmtshare command to create one remotely.

To start Remote Console Server remotely, go to a command prompt and type

netsvc "Remote Console Server" \\TargetComputer /start

Then, you can remotely access an NT server by typing

rclient \\TargetComputer 

Mapping Shared Folders
I'm deploying policies on my company's Windows NT network, and I'm having a problem mapping folders for users. I created a standard Windows 95 desktop environment with some shortcuts to the shared folders on my server. Then, I modified the Default User\Shell\Custom Folder\Custom Desktop Icons policy with the Uniform Naming Convention (UNC) path to the folder in which I saved the desktop icons. Everyone has a standard desktop and can easily open the files through the shortcut folders. However, when I try to save a file, the shortcut folder doesn't show up in the save pop-up window.

I know I can use the script to map a drive, but I don't want to give up. I also don't want to tell my users to use NT Explorer to find the network folders, because the shortcut folders on the users' desktops are more convenient.


Time Synchronization
Many companies use multiple servers, and each server (and workstation) has a different time on its clock. To fix this problem in my organization, I added the following entry to every user's logon script (including the administrator account): net time \\servername /set /yes. This command synchronizes each clock with one of the main domain server's clocks.


ERDs and RDISK
If you're like some administrators, updating (or creating) Windows NT Emergency Repair Disks (ERDs) occurs to you only when you need to use one. Most administrators who fail to create or update ERDs do so out of carelessness rather than because they know of another way to repair NT. You'll be interested to know that you can repair NT without an ERD. (For information about ERDs, see Michael D. Reilly, "The Emergency Repair Disk," January 1997.)

When you run the rdisk /s command, the \winnt\system\repair directory receives an updated Registry backup. The system uses these files when you attempt a repair installation of NT and you tell the installer you don't have an ERD. Thus, you can perform a complete repair of NT without ERDs if your repair directory is up-to-date.

To ensure that your repair directory is up-to-date, use a simple AT command such as AT 00:00 /every:su rdisk /s-. (The hyphen after the /s switch bypasses the rdisk prompt to insert a disk.) I typically schedule rdisk to run only on Sundays, so I can test new configurations all week before I commit them.

If you have a hard disk failure, an updated repair directory is useless and you'll need an ERD. Because an ERD is just an NT-formatted disk that contains the repair directory's contents, you can easily create one at any time if you store the repair directory centrally.

Select a server or workstation in your domain. (I'll call it the REPAIR server.) Configure the Scheduler service to start automatically and to run with a newly created account. This account (which I'll call SCHEDULE) must be a member of the Domain Admins group. Create a directory (e.g., RDISKPLUS) on the REPAIR server, and copy rdiskplus.bat into it. (Listing 2 contains rdiskplus.bat.) Create a text file (e.g., serverlist.txt) that contains the names of all your servers, with one server on each line. Schedule RDISKPLUS on the REPAIR server with the following command

AT 00:10 /EVERY:SU CMD /C "C:\RDISKPLUS\RDISKPLUS.BAT >C:\RDISKPLUS\RDISKPLUS.LOG 2>&1"

Then, on every server in the serverlist.txt file, schedule the rdisk /s- command. If you've already configured the Scheduler service to start automatically, you can simply type

FOR /F "DELIMS=*" %I IN ('TYPE SERVERLIST.TXT') DO AT \\%I 00:00 /EVERY:SU RDISK /S-

For each of your servers, rdiskplus.bat creates a directory (named after the server) under C:\RDISKPLUS that contains the entire repair directory. Then, you can create an ERD at any time by formatting a disk and copying the server's directory contents onto it.


More About Logging Share Permissions
In Reader to Reader: "Logging Share Permissions" (October 1998), Douglas L. Gillett's batch file has a minor flaw—it fails to clean up the old log files automatically. You can add a For command to the end of the script (as you can see at Callout A in Listing 3) to fix this problem. This For command is useful if you run processes that create files every time they run. The skip number specifies how many files to retain (the script retains only the newest files, and discards the others).

Corrections to this Article:
  • "Command Prompt During NT Installation" contains an error in the description of how to get a command prompt during Windows NT installation. Instead of selecting \winnt\system32\cmd.exe and clicking Open, as the article states, you must right-click cmd.exe and select Open from the pop-up menu. We apologize for any inconvenience these errors might have caused.
Hide comments

Comments

  • Allowed HTML tags: <em> <strong> <blockquote> <br> <p>

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
Publish