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 


January 2001

The Best of Daily Answers


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

Occasionally, I need to install Windows NT 4.0 BDCs and other NT systems over a WAN connection, and the PDC is on the other side of the link. However, when I enter the third phase of Setup (i.e., the GUI part), an error message tells me that the computer can't find the domain controller (DC); therefore, I'm unable to join the domain. I use an LMHOSTS file that contains the following lines:

10.10.10.1      MY_PDC  #PRE #DOM:MY_DOMAIN
10.10.10.1      "MY_DOMAIN      \0x1b"  #PRE

According to the Microsoft article "How to Write an LMHOSTS File for Domain Validation and Other Name Resolution Issues" (http://support.microsoft.com/support/kb/articles/q180/0/94.asp), my method should work. What am I doing wrong?

I've encountered the situation you describe on several occasions. A potential workaround exists. First, I want to provide some clarification: I believe the Microsoft article you're referring to is "How to Install a BDC in a Routed TCP/IP Environment" (http://support.microsoft.com/support/kb/articles/q140/4/76.asp).

However, this article contains an apparent contradiction: The article states that the total length of the domain name string inside the double quotes in the LMHOSTS entry needs to be 20 characters. However, in the article's example, Microsoft lists a domain name that contains 10 characters (i.e., DOMAINNAME), followed by one space and the \0x1b hexadecimal code—a total of only 16 characters. The 20-character statement is correct, despite the typographical error.

The significance behind the 16-character length is that NetBIOS names (e.g., domain names, machine names) can contain as many as 15 characters, as well as a 16th character that indicates the NetBIOS suffix (representing the NetBIOS service type). In the case of your LMHOSTS entry, the suffix that the hex code \0x1b represents is that of the domain master browser. For a complete list of NetBIOS suffixes and their respective meanings, see the Microsoft article "Net-BIOS Suffixes (16th Character of the NetBIOS Name)" at http://support.microsoft.com/support/kb/articles/q163/4/09.asp.

Creating an LMHOSTS file might resolve your problem, depending on whether the file existed before the system initialized the TCP/IP stack. If the file did exist, the domain name and domain master browser (i.e., PDC) name should be in the NetBIOS name cache. However, plenty of circumstances exist in which a perfectly good LMHOSTS file won't resolve your problem. In such cases, you can fool NT into opening a command-prompt session.

When you configure the TCP/IP stack during Setup, go to the WINS tab and click Import LMHOSTS. In the Open With dialog box, which Figure 3 shows, right-click any file that doesn't already have a file association and choose Open With from the menu. Next, click Other, browse to the \%systemroot%\system32 folder, and select cmd.exe as the command to use to open the file. Be careful not to select the Always use this program to open this file check box, because you don't want to create a long-term association for that file type with cmd.exe. After you click OK, NT drops you to a command prompt instead of opening the file.

Now that you have a command-prompt window open, you can take diagnostic and corrective actions that are otherwise impossible during Setup. For example, you can use Ping and Tracert to diagnose connectivity problems, and you can use Nbtstat —R to reload the NetBIOS name cache (including any new entries in the LMHOSTS file) or Nbtstat —c to list cached names and verify that the cache lists the PDC and domain names.

However, remember that NT Setup might not have copied to the hard disk all the utilities you want to use during this session. In this case, simply copy the files you want to a 3.5" disk on another NT system. Then, either use the utilities from the 3.5" disk or copy the utilities to the hard disk of the system on which you're running the installation.

My company uses many long filenames in the directory structures of our network's various disk volumes. Because I'm an old command-line DOS jockey, I like to work at a command prompt, but navigating with the Cd command can be frustrating, especially with long filenames. For example, changing to a directory such as C:\program files\my application at the command prompt requires a lengthy Cd command (e.g., Cd "\program files\my application"). How can I simplify my life at the command line?

I can provide a few tips that you might find useful in command-prompt sessions. All of these tips work with both Windows 2000 and Windows NT.

First, when you're changing to a directory underneath the current directory at the command prompt, you don't need to type the target directory's full name. Instead, you can use an asterisk (*) wildcard with the Cd command. For example, to change to a directory called Program Files underneath the current directory, simply type

cd prog*

This command moves you into the closest directory that begins with "prog," which in this case is Program Files. (Note that this technique might not take you to the correct directory if other directories share the same match string before the asterisk. Therefore, be sure to provide as much information as necessary to uniquely match the desired target directory.)

Another tip that you might find helpful is modifying the Windows Explorer GUI so that you can easily drop to a command prompt from any Windows Explorer folder. One way to obtain this functionality is to download the Microsoft PowerToy called Command Prompt Here from http://www.microsoft.com/ntworkstation/downloads. To install the utility, simply expand the self-extracting executable, right-click the extracted doshere.inf file, and choose Install from the resulting menu. After you install the utility, you'll have a menu option in every Windows Explorer folder window that lets you drop to a command-prompt session (with the selected folder as the default directory). You can use this tool in several ways. The primary advantage is that you can right-click a folder icon in a Windows Explorer window and choose the Command Prompt Here option from the resulting menu. Additionally, you can right-click the icon in the upper-left corner of any open folder and choose the Command Prompt Here option from the resulting menu.

Another command-line trick enables command-line completion. If you're familiar with UNIX, you might lament that NT won't let you use the Tab key at the command line to autocomplete filenames within the current directory. However, you can mimic this ability in Win2K or NT: Edit the HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Command Processor or HKEY_CURRENT_USER\Software\Microsoft\Command Processor registry subkey. (If the value exists in both locations, the value in HKEY_CURRENT_USER will override the value in HKEY_LOCAL_MACHINE.) Using regedit or regedt32, navigate to either key, double-click the CompletionChar value of type REG_DWORD (or add the value, and the Command Processor registry subkey, if they don't exist), and set the data to 9. In future command-prompt sessions, you'll be able to use Tab to autocomplete filenames at the command line.

Alternatively, to automatically complete the names of folders you're specifying in a command-prompt window, be sure that you're running the command-prompt session in a window rather than in full-screen mode. Type the portion of the command you're entering up to the name of the directory you want to reference (e.g., "Cd" includes a space after Cd before the directory name). If you open any Windows Explorer window from which you can see the target folder that you want to reference, you can simply drag the folder icon into the command-prompt window. This action causes the system to automatically insert the folder name—including the double quotes—at the end of the current command line. This tip works with any command line in a command-prompt window.

   Previous  1  [2]  3  Next 


Top Viewed ArticlesView all articles
No Jobs, No Excitement at Apple's Last Macworld Keynote

Apple CEO Steve Jobs made the right move in skipping out on his company's last appearance at Macworld: In a Tuesday keynote address at the conference, Apple had no interesting new products to sell, opting instead to spend mind-numbing amounts of time on ...

Where is Microsoft NetMeeting in Windows XP?

...

Command Prompt Tricks

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


Exchange Server and Outlook Whitepapers Protecting (You and) Your Data with Exchange Server 2007

StoreVault SnapManagers for Microsoft Exchange and SQL Server

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!

Exchange Server and Outlook eBooks Spam Fighting and Email Security for the 21st Century

Understanding and Leveraging Code Signing Technologies

The Expert's Guide for Exchange 2003: Preparing for, Moving to, and Supporting Exchange Server 2003

Related Exchange Server and Outlook 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.

Exchange & Outlook UPDATE eNewsletter
News, strategies, products, and developments in Exchange Server and Outlook messaging.

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