Windows IT Pro is the authoritative and independent resource for windows nt, windows 2000, windows 2003, windows xp. Features a collection of resources and magazines for windows IT professionals.
  
  
  Advanced Search 


February 1998

Reader to Reader - February 1998

RSS
Subscribe to Windows IT Pro | See More Registry Articles Here | Reprints | Or get the Monthly Online Pass—only $5.95 a month!

Download the Code Here
Download the Code Here
Download the Code Here
Download the Code Here

[Editor's note: Share your NT discoveries, comments, experiences with products, problems, and solutions and reach out to other Windows NT Magazine readers (including Microsoft). Email your contributions (under 400 words) to Karen Forster at karen@winntmag.com. Please include your phone number. We will edit submissions for style, grammar, and length. If we print your letter, you'll get $100.]

In the October 1997 Reader to Reader, "Windows NT Message of the Day," William A. Dodd discussed how to create a pseudo Message of the Day feature for Windows NT Workstation or Server similar to that feature in UNIX. I have another way to create this option. My method uses existing system features and doesn't require creating and compiling a separate C program. However, you can create only one message per day.

My method uses two Registry entries—LegalNoticeCaption and LegalNoticeText—to create the pseudo Message of the Day. You will find these keys in the Registry entry HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon.

To make the Registry easier to work with and less prone to error, you can create a batch file to modify the Registry. The batch file creates a temporary file that regedit.exe uses to make the modifications to the Registry. (Although Microsoft recommends using regedt32.exe rather than regedit.exe as the Registry editor for NT, regedit.exe is adequate here because you're simply updating the Registry with string data.) Listing 1 contains the batch file, and Listing 2 shows you the contents of the resulting temporary file.

You can use my method to update or create other Registry keys. As with any process that modifies the Registry, make sure you back up the Registry before making any modifications.

Application Simplifies Creating User Accounts
My school district has Windows NT 3.51 and 4.0 running on servers and workstations. Each student in grades 6 through 12 receives accounts to access these computers. At each semester break, I must create a minimum of 600 accounts—a time-consuming task I don't enjoy.

Initially, I used User Manager for Domains and File Manager to create the user accounts. On average, I needed 2 days to input all the information. But now I use an application I wrote in C++ to quickly create user accounts. As the dialog box in Screen 1 shows, I define most of the user's initial account attributes and specify which groups the user will belong to. After I finish with the user account, the system automatically clears the first and last name text boxes, letting me quickly move to the next account.

Although I initially wrote the application to create user accounts, you can adapt it to perform many other functions. For example, I used the application to create several customized dialog boxes that I'll briefly describe.

Reset Password dialog box. Students occasionally forget their password. In the past, I had to go into User Manager for Domains to reset a password. But with the Reset Password dialog box, I just enter the server name, click Search, select the account, enter the password, and click Reset.

Locked Accounts dialog box. Students sometimes enter the wrong password and get locked out of their account. To quickly unlock accounts, I use the Locked Accounts dialog box in which I enter the server name, click Search, select the locked account, and click Unlock.

Scan Internet Log dialog box. The school district's network uses Microsoft Proxy Server to connect to the Internet. Proxy Server produces a log file showing all the activity for a given day. Searching through log files for a specific user's activities gets old fast, so I created the Scan Internet Log dialog box. I enter the log file name and click Scan, which brings up a list of the students who connected to the Internet that day, when they began and ended their Internet session, and how many hits they made. If I want to see the details for a specific student, I select that user and click Detail. A User Detail dialog box pops up, showing what sites the student visited and how often. If I want the details for a specific site, I select the site and click Detail, which brings up a dialog box showing the times the student visited the site.

Query dialog box. I created the Query dialog box to look at how many bytes and Megabytes of disk space each directory is using.

You can adapt this application for any number of uses. You can download the application's .exe file and three .dll files from the Windows NT Magazine Web site at http://www.winntmag.com.

Have Num Lock Come on Automatically
Have you ever been annoyed by Windows NT's habit of turning off the Num Lock key, even if your system BIOS turns it on at boot up? You might expect to find a check box to control the Num Lock key in the Control Panel under Keyboard, but none exists. You can, however, control the Num Lock key in the Registry under HKEY_CURRENT_USER\Control Panel\Keyboard. Change the value of InitialKeyboardIndicators to 2. Num Lock will come on automatically the next time you log on.

If you want to implement this fix systemwide, add the system policy template file in Listing 3 to your INF directory. You also need to load the system policy template file with your usual templates in System Policy Editor (SPE). Loading this file will add a check box for Numeric Keypad under the category Windows NT Login in SPE. Select the check box. Now, any users assigned to the policy will find that Num Lock comes on automatically.

Create User IDs Quickly and Efficiently
My company had just installed a new Windows NT network, so I needed to enter about 500 new user IDs, complete with description, logon script, and home directory path. In addition, I needed to create the home directories, set the proper permissions, and share the directories (again with the proper permissions). I wasn't looking forward to manually entering all this information.

But the task wasn't bad for two reasons. First, the characters for the user IDs and home directories were straightforward. The user ID was the first five letters of the user's last name followed by the user's first initial. For example, John Smith had a user ID of SmithJ. The user's home directory was the same name as the six-character user ID.

Second, I used several utilities in the Microsoft Windows NT Server Resource Kit and Microsoft Excel. The first resource kit utility that saved me hours of work was addusers.exe, which has the following syntax:

addusers [ \\computername ] [{ /c | /d | /e } filename] [/s:x] [/?]

The /c option adds users to NT based on information in a comma-delimited text file. The /d option dumps current user information to a text file. The /e option erases user information specified by a text file.

You can use addusers.exe not only to create users, but also to add them to local and global groups. For this discussion, I will address only creating users. To create users, complete the following five steps.

   Previous  [1]  2  Next 


Top Viewed ArticlesView all articles
CES 2009: Ballmer Announces Windows 7, Windows Live, Live Search Milestones

During his first-ever Consumer Electronics Show (CES) 2009 keynote address last night in Las Vegas, Microsoft CEO Steve Ballmer announced the pending public availability of a feature-complete Windows 7, the final version of Windows Live Essentials, and ...

Command Prompt Tricks

One reader shares his tip for setting up the command prompt to reflect a remote path. ...

Where is Microsoft NetMeeting in Windows XP?

...


Windows OSs Whitepapers Why SaaS is the Right Solution for Log Management

Related Events Virtualization Forum: Optimizing Storage, Networks, Desktops, and Security

Cloud Computing Forum: Integrating Software, Server and Storage as a Service into Your Enterprise IT Delivery Model

Virtualization Forum: Optimizing Storage, Networks, Desktops, and Security

Check out our list of Free Email Newsletters!

Windows OSs eBooks Understanding and Leveraging Code Signing Technologies

A Guide to Windows Certification and Public Keys

SQL Server Administration for Oracle DBAs

Related Windows OSs Resources Become a VIP member of the Windows IT Pro community!
Get it all with the VIP CD and VIP access. A $500+ value for only $279!

Subscribe to Windows IT Pro!
Solve your toughest technical problems with our experts and access 10,000 + articles online. 30% off

Monthly Online Pass - Only $5.95!
Get instant access to 10,000+ articles from Windows IT Pro Magazine!

TechNet Virtual Labs
Evaluate and test Microsoft's newest products.


Windows IT Pro Home Register FAQ for Windows WinInfo News
Europe Edition About Us Contact Us/Customer Service Media Kit Affiliates / Licensing  
SQL Server Magazine Office & SharePoint Pro Windows Dev Pro IT Job Hound ITTV
IT Library Technology Resource Directory Connected Home Windows Excavator Windows SuperSite 
 
 Windows IT Pro is a Division of Penton Media Inc.
 Copyright © 2009 Penton Media, Inc., All rights reserved. Terms and Use | Privacy Statement | Reprints and Licensing