Hidev's Knowledge base Questions listing.
To search for answers go to our kb category page HERE





How to Configure an Authoritative Time Server in Windows 2000
 

Windows includes the W32Time Time service tool that is required by the Kerberos authentication protocol. The purpose of the Time service is to ensure that all computers that are running Windows 2000 or later in an organization use a common time. The Time service uses a hierarchical relationship that controls authority and does not permit loops to ensure appropriate common time usage.

Here is a quick fix... copy this into your command window: net time /setsntp: ntp2.usno.navy.mil

Windows-based computers use the following hierarchy by default:

  • All client desktop computers nominate the authenticating domain controller as their in-bound time partner.
  • All member servers follow the same process as client desktop computers.
  • Domain controllers may nominate the primary domain controller (PDC) operations master as their in-bound time partner but may use a parent domain controller based on stratum numbering.
  • All PDC operations masters follow the hierarchy of domains in the selection of their in-bound time partner.

Following this hierarchy, the PDC operations master at the root of the forest becomes authoritative for the organization, and you should configure the PDC operations master to gather the time from an external source. This is logged in the System event log on the computer as event ID 62. Administrators can configure the Time service on the PDC operations master at the root of the forest to recognize an external Simple Network Time Protocol (SNTP) time server as authoritative by using the following net time command, where server_list is the server list:

net time /setsntp: server_list

There are several SNTP time servers run by the U.S. Naval Observatory that are satisfactory for this function, for example:

  • ntp2.usno.navy.mil at 192.5.41.209
  • tock.usno.navy.mil at 192.5.41.41

After you set the SNTP time server as authoritative, run the following command on a computer other than the domain controller to reset the local computer's time against the authoritative time server:

net time /set

More information about the net time command is available at a command prompt if you type the following command:

net time /?

SNTP defaults to using User Datagram Protocol (UDP) port 123. If this port is not open to the Internet, you cannot synchronize your server to Internet SNTP servers.

NOTE : Administrators can also configure an internal time server as authoritative by using the net time command. If the administrator directs the command to the operations master, it may be necessary to reboot the server for the changes to take effect.

For additional information, see the following Microsoft white paper:

The Windows Time Service
http://www.microsoft.com/windows2000/docs/wintimeserv.doc

.net framework not working correctly in iis
 

From the command line, browse to the installation directory:

 (%WinDir%\Microsoft.Net\Framework\v1.1.4322} and run "aspnet_regiis.exe -i". 
This will install the sundry ASP.Net files, and register it with IIS correctly.

Also copy the aspnet_client from the wwroot and place the copy in any other web root directory that you may be using.

 

Access 97 No License error
 

If you are trying to install Access 97 with Access 2000 or 2002 already installed you can get this error. Search for the font: Hatten.ttf move to another location(desktop). rename the .ttf to .old. or just delete. If you are in the Fonts folder you will not be able to change the TTF filename extension- You must move the Hatten file to another folder to change the name.

Re-instal Access 97
When you reinstall Access97 it will create a new Hatten.ttf in the Fonts
folder, then you could delete the other file that you changed.

Open the program...all fixed.
There is also a patch for this, however it only works with Windows 98!

Add a Default Printer Using .VBS script
 The Windows Printer Mapping on Terminal Service cannot automatically map a printer if the printer is not locally attached to an LPT, COM, or USB port.

To map network printers for use in Windows 2000 Terminal Services and Windows NT 4.0 Terminal Server, follow these steps:
 
In the following script, replace PrinterDriver with the name of the driver you are adding and \\Server\Printer with the name of the shared printer and server:Set WshNetwork = CreateObject("WScript.Network")
PrinterPath = "\\Server\Printer"
PrinterDriver = "PrinterDriver"
WshNetwork.AddWindowsPrinterConnection PrinterPath, PrinterDriver
WshNetwork.SetDefaultPrinter "\\Server\Printer"
                         
Save and execute the script in a Visual Basic (VBS) file.
NOTE: The parameter PrinterDriver must have the exact name of the driver as it appears in the left column of the Ntprint.inf file.

For example, if you want to install a Cannon Bubble-Jet BJ-230, then the line in the script should read PrinterDriver = "Canon Bubble-Jet BJ-230".

Excerpt from ntprint.inf: ++++++++++++++++++
"Canon Bubble-Jet BJ-230"  = CNBJ230.GPD, CanonCanon_Bubble-JeFF70,Canon_Bubble-Jet_BJ-230
                    
NOTE: Windows NT 4.0 Terminal Server does not have Windows Scripting Host by default. Windows Scripting Host must be installed first to execute the scripts.

To add a different printer for each user that logs on to Terminal Services, follow these steps:
In the following script, replace PrinterDriver with the names of the drivers you are adding. Replace UsernameX with the name of the user, and add more sections as needed:Set WshNetwork = CreateObject("WScript.Network")

Select Case WshNetWork.UserName

    Case "Username1"
   
        PrinterPath = "\\Server\Printer1"
        PrinterDriver = "PrinterDriver"
        WshNetwork.AddWindowsPrinterConnection PrinterPath, PrinterDriver

        WshNetwork.SetDefaultPrinter "\\Server\Printer1"
   
    Case "Username2"
   
        PrinterPath = "\\Server\Printer2"
        PrinterDriver = "PrinterDriver"
        WshNetwork.AddWindowsPrinterConnection PrinterPath, PrinterDriver

        WshNetwork.SetDefaultPrinter "\\Server\Printer1"
End Select
                         
Set the script to run each time the user logs on to Terminal Services (use Logon Script or Group Policy) and end select.
For more information on scripts, do one of the following:
Click Windows Script Host, click Documentation, and then click either Whitepaper or Technical Paper to reach these documents:

White paper:
Windows Script Host: A Universal Scripting Host for Scripting Languages

Technical paper:
Windows Script Host Programmer's Reference
Click the link below to view the following topic on the Microsoft Web site:

Microsoft Windows Script Technologies

http://www.msdn.microsoft.com/library/default.asp?url=/nhp/default.asp?contentid=28001169

if this link does not work go to microsoft.com click on support select knowledgebase select search by article ID number and type in the article ID # 263226 then hit go when it comes up with the above page then click on the link at the bottom titled "Microsoft Windows Script Technologies" which will take you to the msdn part of microsoft's website which will give further information


HERE IS INFORMATION ON A UTILITY SPECIFIC TO WINDOWS 2000


How to Add Printers with No User Interaction in Windows
The information in this article applies to:
Microsoft Windows 2000 Server
Microsoft Windows 2000 Professional

This article was previously published under Q189105
SUMMARY
Windows 2000 provides the ability to install a printer using a command line. This is particularly useful when you add or remove a printer from a group of users using a login script or a scheduled event.

Although Microsoft Windows NT 4.0 Zero Administration Kit (ZAK) contains tools such as Con2prt.exe, the Con2prt.exe tool provides the ability to add or delete only network printers. You can also modify and delete local printers using Windows 2000. The result is that an administrator can control all aspects of a user's ability to print by having users run a batch file or logon script.

NOTE: Using this command in a login script or a client-launched batch file requires the client computer to be running Windows 2000. Because the login script runs on the client computer, a Windows NT 4.0 client is unable to process the command.

In addition, these commands can be run from an administrator's workstation or from a server so that the printers are push-installed to the client computers without having to go to the actual computer.
MORE INFORMATION
The following examples list the most typical uses for the command.

NOTE: This command only runs on a Windows 2000 computer against a Windows 2000 or a Windows NT 4.0 server or workstation.

This example adds an Agfa printer driver and creates a logical printer on a computer named SERVER.

NOTE: Both lines can be placed in a batch file or typed after each other at a command prompt. These two lines are wrapped for readability.
rundll32 printui.dll,PrintUIEntry /ia /c\\server /m "AGFA-AccuSet v52.3" /h "Intel" /v "Windows 2000" /f %windir%\inf\ntprint.inf

rundll32 printui.dll,PrintUIEntry /if /b "Test Printer" /c\\SERVER /f "%windir%\inf\ntprint.inf" /r "lpt1:" /m "AGFA-AccuSet v52.3"

This example deletes an AGFA printer on a computer named SERVER:
rundll32 printui.dll,PrintUIEntry /dl /b "Test Printer" /c\\SERVER

For more information about the available switches, type /? after the command.

In addition, at a command prompt, type:
rundll32 printui.dll,PrintUIEntry /?

The preceding command displays the entire list of usage switches with extensive examples for using this method.

NOTE: The following syntax is an example that works correctly as long as the Standard TCP/IP Ports are created.
rundll32 printui.dll,PrintUIEntry /if /b "NORTH-US-SRTEST-TEST24-BOGUS" /f %windir%\inf\ntprint.inf /r "IP_157.57.50.98" /m "HP Laserjet 4000 Series PCL" /Z

If Standard TCP/IP Ports are not created, the following error dialog box may be experienced:

Printer User Interface
Printer rundll command failed.
Command: /if /b "NORTH-US-SRTEST-TEST24-BOGUS" /f %windir%\inf\ntprint.inf /r "IP_157.57.50.98" /m "HP Laserjet 4000 Series PCL" /Z.
You either entered a printer name that was incorrect or the specified printer is no longer connected to the server.
Alternate TCP/IP configuration
 

Laptop users often experience problems when moving between networks where DHCP servers aren't consistently used (e.g., moving between an office that uses DHCP to assign IP addresses and a home network that uses static IP addresses). If you configure your computer to use DHCP and no DHCP server is available, the machine will typically use an IP address in the range 169.254.0.1 to 169.254.255.254 with a subnet mask of 255.255.0.0.

The actual IP address will depend on what IP addresses other machines on the local subnet have selected (XP will perform a limited test to ensure the Windows TCP/IP component doesn't use an address already in use). Because the local TCP/IP stack assigns no WINS, DHCP, or gateway information, all IP communication is limited to machines in the local subnet.

XP lets you create an alternate IP configuration that you can use when your system can't find a DHCP server. This alternate configuration lets you specify an IP address, subnet, gateway, and the other typical network settings. To create this alternate IP configuration, perform the following steps:

Open the Network Connections applet - (go to Start, Programs, Accessories, Communications and click Network Connections). Right-click the network adapter for which you want to specify an alternate IP configuration, then click Properties.  Select Internet Protocol (TCP/IP), then click Properties.
Under the General tab, ensure that you've configured the connection to use DHCP.
Select the Alternate Configuration tab, select "User configured," then fill in the static IP address details you want the connection to use when the system can't find a DHCP server.

If you are using a ststic address the 'Alternate Config' tab will not be shown!
You must be using DHCP.

XP stores the custom connection configuration settings under: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\Interfaces\   registry subkeys

More on default settings

When Windows2000/XP is configured for TCP/IP "to Obtain an IP address automatically" via DHCP, it will first attempt to locate a DHCP-server (which can takes some time ). If no DHCP
server is found on the network, it will use the build-in "Automatic Client Configuration"
(sometimes referred to as APIPA ) to assign itself an IP-address in the address-range 169.254.x.x
with Subnet- mask 255.255.0.0.

On a large network with a predefined address range, this is often not required, because it will make
the trouble-shooting of networking problems more difficult when Windows2000 / XPtakes such an
"initiative" on its own.
It is possible to de-activate this feature. (The required changes in the registry are listed on the Microsoft Knowledge base articleQ244268):

You can deactivate the AutoIPgeneration for the complete computer using the Registry-key:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters
Add the following value to this key: "IPAutoconfigurationEnabled", Value type: REG_DWORD
Value in hexadecimal: 0 (A value of 0 disables APIPA support on this computer) :

You can deactivate the AutoIPgeneration for just one or more network adapters:

You need to find a registry entry under:
HKEY_LOCAL_MACHINE\system\CurrentControlSet\Services\Tcpip\Parameters\Interfaces\<adapter>

Create a new DWORD-key "IPAutoconfigurationEnabled" with the value set to 0 :

When restarting now Windows2000/ XP and no DHCP-server is found on the network,
no IP-address will be assigned:

in a Command-prompt window, run : ipconfig
Windows 2000 IP Configuration
Ethernet adapter Local Area Connection

Connection-specific DNS SUffix . :
IP Address . . . . . . . . . . . . . .
Subnet Mask . . . . . . . . . . . .
Default Gateway
0.0.0.0
0.0.0.0

the IP-address "0.0.0.0" is invalid, it indicates that your system has no IP-address

How to identify the registry key for your network adapter ?

Check in the Properties of your Network configuration the EXACT name for your Network card, as listed under:
Connect using :( select it by dragging and copy it to the clipboard)

Search now the Registry for that "Adapter Description", you need to find the "ClassGUID",
a PCI-network card will be listed under
HKEY_LOCAL_MACHINE\system\CurrentControlSet\Enum\PCI :

with the "ClassGUID", search in
HKEY_LOCAL_MACHINE\system\CurrentControlSet\Control\Class\ for this class"

Check the sub-keys for the proper DriverDescription to match your network card. and look for the Key "NetCfgInstanceID", which is identical to your <adapter> number. if you have multiple matches showing the same DriverDescription, check under the sub-key  "Linkage" for the "UpperBind" to be "TCPIP".

 

An error occurred attempting to create the Object Picker
 This error can occur when either of the following registry keys is missing or corrupted:

HKEY_CLASSES_ROOT\CLSID\{080d0d78-f421-11d0-a36e-00c04fb950dc}

HKEY_CLASSES_ROOT\LDAP

The second key that is listed may be missing or corrupt or may not contain the value:

{228D9A81-C302-11cf-9AA4-00AA004A5691}

NOTE: If your registry keys contain values rather than being blank or missing, you should first back up the keys by using the Export Registry Key feature in Regedit.exe. You should then examine the entries for differences and merge them if you need to.

If the HKEY_CLASSES_ROOT\CLSID\{080d0d78-f421-11d0-a36e-00c04fb950dc} key is missing or damaged, add the following lines to a text file, rename it with a .reg extension, and then import it to your registry.

On a Windows 2000-based domain controller use the following text:

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\CLSID\{080d0d78-f421-11d0-a36e-00c04fb950dc}] @="ADs LDAP Pathname Descriptor Object"

[HKEY_CLASSES_ROOT\CLSID\{080d0d78-f421-11d0-a36e-00c04fb950dc}\InprocServer32]@="activeds.dll"
"ThreadingModel"="Both"

[HKEY_CLASSES_ROOT\CLSID\{080d0d78-f421-11d0-a36e-00c04fb950dc}\ProgID] @="Pathname"

[HKEY_CLASSES_ROOT\CLSID\{080d0d78-f421-11d0-a36e-00c04fb950dc}\TypeLib] @="{97d25db0-0363-11cf-abc4-02608c9e7553}"

[HKEY_CLASSES_ROOT\CLSID\{080d0d78-f421-11d0-a36e-00c04fb950dc}\Version] @="0.0"

On a Windows 2000-based domain member computer use the following text:

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\CLSID\{080d0d78-f421-11d0-a36e-00c04fb950dc}] @="ADs Pathname Object"

[HKEY_CLASSES_ROOT\CLSID\{080d0d78-f421-11d0-a36e-00c04fb950dc}\InprocServer32]@="activeds.dll"
"ThreadingModel"="Both"

[HKEY_CLASSES_ROOT\CLSID\{080d0d78-f421-11d0-a36e-00c04fb950dc}\ProgID] @="Pathname"

[HKEY_CLASSES_ROOT\CLSID\{080d0d78-f421-11d0-a36e-00c04fb950dc}\TypeLib] @="{97d25db0-0363-11cf-abc4-02608c9e7553}"

[HKEY_CLASSES_ROOT\CLSID\{080d0d78-f421-11d0-a36e-00c04fb950dc}\Version] @="0.0"

If the HKEY_CLASSES_ROOT\LDAP key is missing, or damaged, use the following text:

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\LDAP]
@="URL:LDAP Protocol"
"EditFlags"=hex:02,00,00,00
"URL Protocol"=""

[HKEY_CLASSES_ROOT\LDAP\Clsid]
@="{228D9A81-C302-11cf-9AA4-00AA004A5691}"

[HKEY_CLASSES_ROOT\LDAP\shell]

[HKEY_CLASSES_ROOT\LDAP\shell\open]

[HKEY_CLASSES_ROOT\LDAP\shell\open\command]
@="\"D:\\Program Files\\Outlook Express\\wab.exe\" /ldap:%1"

I have created these reg files in zip for easy download... see below.

 

Backup EXEC Service Account issues
 

Basically to be able to backup and restore individual Exchange Mailboxes the BackupEXEC Service account needs to be able to have access to all of those mailboxes via MAPI..  If you did not setup this service account during the initial install here is how to do it:

  1. Create the account in Active Directory Users and Computers.  NOTE: The first five characters in the account name can not match that of any current/previous account or mailbox. 
    NOTE: DO NOT HIDE THIS ACCOUNT FROM EXCHANGE ADDRESS LISTS!
  2. Join the account to the Administrators group of the domain.
  3. Open up “Exchange System Manager“ and drill down to the Exchange Server that your mailbox is located on.  Right click the server name, select properties and then click on the “Security“ tab.  Add the account you just created and give it Full Control.
  4. Go into Control Panel and open up the Services app.  Double click on all of your Backup EXEC services and have them logon as the service account you created.  You will be told at some point during this that the machine is granting the service the right to logon as a service.  Obviously this is exactly what you want :)
  5. Once you've done this re-start all the Backup EXEC services.
  6. Now open up the Domain Controller Security Policy console and drill down like this: Security Settings --> Local Policies --> User Rights Assignment. Double click “Log on locally“ and add the account you created in step 1.
  7. Now logoff and log back on with the account you created in step 1 and run Backup EXEC.  In case you don't have an icon handy with this account the defalt for the EXE is:

    C:\Program Files\VERITAS\Backup Exec\NT\bkupexec.exe
  8. Select the Backup Selections tab and you should be able to see all the mailboxes you wish to see.


Bios Beep Codes
 

Most PC's conduct Power On Self Tests prior to attempting to boot. Should there be a failure at this stage, you will hear a series of "beeps" which give an indication of the error. The following is a typical set of beep codes, used in AMI WinBios, which may or may not be correct for your particular machine - check your computer or motherboard manual for exact codes for your machine.

Beeps Error Message
1 Refresh Failure
2 Parity Error
3 Base 64K RAM Failure
4 Timer Not Operational
5 Processor Error
6 Gate A20 Failure
7 Processor Exception Interrupt Error
8 Display Memory Read/Write Error
9 ROM Checksum Error
10 CMOS Shutdown Register Read/Write Error
11 Cache Memory Bad

Boot Disks
 

How to Create a Bootable Disk for an NTFS or FAT Partition

This article was previously published under Microsoft Q119467

SUMMARY

This article describes how to create a Windows bootable(startup) disk to access a drive with a faulty boot sequence on an Intel-based computer.

Note The procedure for RISC-based computers is different and not documented in this article.

MORE INFORMATION

You may be able to use a Windows bootable disk to start the operating system on a computer running Windows NT or Windows 2000. Use the procedures in this article to work around the following boot problems:
  • Damaged boot sector
  • Damaged master boot record (MBR)
  • Virus infections
  • Missing or damaged Ntldr or Ntdetect.com files
  • Incorrect Ntbootdd.sys driver
  • To boot from the shadow of a broken mirror

    Note that you may have to modify the Boot.ini file to do this.
Note that you cannot use the Windows Emergancy Repair disk (ERD) to help resolve the following problems:
  • Incorrect or damaged device drivers that are installed in the System folder.
  • Boot problems that occur after you see the Windows Startup (Osloader) screen.
To work around or fix these problems, run the ERD, load the last known good control set, or reinstall Windows.

How to Create a Windows Bootable Disk

The Windows boot disk must include the Ntldr (or Setupldr.bin in Windows NT 3.5),Ntdetect.com, and Boot.ini files, and may require ntbootdd.sys which is the device driver for your hard disk controller renamed to ntbootdd.sys.

Note The Ntldr, Ntdetect.com, and Boot.ini files typically have their file attributes set to system, hidden, or read-only. You do not have to reset these attributes for the bootable disk to work. For additional information about the structure of the Boot.ini file, click the article number below to view the article in the Microsoft Knowledge Base:

102873 BOOT.INI and ARC Path Naming Conventions and Usage

To create a Windows bootable floppy disk, use one of the following methods.

If You Do Not Have Access to a Computer Running Windows

  1. Create a copy of the first Windows Setup disk by using the diskcopy command. To do this:
    1. Click Start, and then click Shut Down.
    2. Click Restart the computer in MS-DOS mode, and then click Yes.
    3. At a command prompt, type the following command, where <a> is the drive that contains the Windows Setup disk and <b> is the drive that contains the blank floppy disk that you want to become the Windows startup disk:

      diskcopy a: b:

  2. Copy both the Ntdetect.com and Ntldr files from the I386 folder on the Windows CD-ROM to the new floppy disk.
  3. Rename the Ntldr file to Setupldr.bin.
  4. Create a Boot.ini file.

    The following sample Boot.ini file provides an example for a single partition SCSI drive with Windows installed in the Winnt folder; however, the exact value in the [operating systems] section depends on the configuration of the Windows computer that you want to start up:

    [boot loader]
    timeout=30
    Default= scsi(0)disk(0)rdisk(0)partition(1)\winnt

    [operating systems]
    scsi(0)disk(0)rdisk(0)partition(1)\winnt="Microsoft Windows 2000 Advanced Server" /fastdetect

    If your computer boots from an IDE, EIDE, or ESDI hard disk, replace scsi(0) with multi(0). If you are running Windows NT 3.5 or Windows NT 3.51 and your computer boots from the first or second SCSI drive, then you can also replace scsi(0) with multi(0).

    If you are using scsi(x) in the Boot.ini file, copy the correct device driver for the SCSI controller that is in use on the computer, and then rename it to Ntbootdd.sys. If you are using multi(x) in the Boot.ini file, you do not have to do this.
  5. Start your computer by using the startup disk, and then log on to Windows.

If You Have Access to a Computer That Is Running Windows

  1. On the computer that is running Windows, format a floppy disk by using the full format option in the Windows NT utility. To do so, type format a: at a command prompt, and then press ENTER.

    Notes
    • You cannot format the floppy by using Microsoft Windows 95, Microsoft Windows 98, or Microsoft Windows Millennium Edition.
    • You must perform a full format to properly rewrite any boot sector content on the floppy disk. A full format prevents boot sector viruses from running.
    • If you perform a quick format on the first Windows Setup bootable floppy disk, the boot sector keeps a reference to the Setupldr.bin file and requires that you rename the Ntldr file to Setupldr.bin.
  2. Copy the Ntldr file from the Windows CD-ROM or from a computer that is running the same version of Windows as the computer that you want to access with the startup floppy disk. In Windows 2000, the NTLDR file is found in the I386 folder on the Windows 2000 CD-ROM. For Windows NT 4.0, you can copy this file from the Windows NT 4.0 CD-ROM.

    Note In versions of Windows earlier than Windows NT 4.0, you may have to expand the file from NTLDR._ to NTLDR by typing the following command at a command prompt:

    expand ntldr._ ntldr

  3. Copy the Ntdetect.com file to the floppy disk that you formatted in step 1.
  4. Create a Boot.ini file on the floppy disk that you formatted in step 1. You can also copy the file from another computer that is running Windows and then modify it to match the computer that you are creating the startup disk for. The following example works for a single-partition SCSI drive with Windows 2000 Advanced Server installed in the Winnt folder, but the exact value in the [operating systems] section depends on the configuration of the Windows-based computer that you are creating the startup disk for:

    [boot loader]
    timeout=30
    Default= scsi(0)disk(0)rdisk(0)partition(1)\Winnt

    [operating systems]
    scsi(0)disk(0)rdisk(0)partition(1)\WINNT="Microsoft Windows 2000 Advanced Server" /fastdetect

    If your computer starts from an IDE, EIDE, or ESDI hard disk, replace scsi(0) with multi(0). If you are using a computer that is running Windows NT 3.5 or Windows NT 3.51 and your computer starts from the first or second SCSI drive, then you can also replace scsi(0) with multi(0). For example:

    [boot loader]
    timeout=30
    default=multi(0)disk(0)rdisk(0)partition(1)\WINNT
    [operating systems]
    multi(0)disk(0)rdisk(0)partition(1)\WINNT="Microsoft Windows 2000 Advanced Server" /fastdetect
     

    If you are using scsi(x) in the Boot.ini file, copy the correct device driver for the SCSI controller that is in use on the computer, and then rename it Ntbootdd.sys. If you are using multi(x) in the Boot.ini file, you do not have to do this.

    Note By default, Windows 2000 is installed to the C:\Windows folder. However, if the computer is using an earlier version of Windows, or if the computer was upgraded to Windows 2000 from an earlier version of Windows, then by default, Windows 2000 is installed to the C:\WINNT folder. Verify that the Boot.ini file shows the correct %SystemRoot% folder for Windows.
  5. Start your computer by using the startup disk, and then log on to Windows.

If You Are Using Windows NT 3.51

  1. Format a blank floppy disk in Windows NT 3.51.
  2. Copy both the Ntdetect.com and Ntldr files to the new disk.
  3. Create a Boot.ini file with the following lines (note that this example is for a single partition SCSI drive with Windows NT installed in the default folder, C:\Winnt35):

    [boot loader]
    timeout=30
    Default= multi(0)disk(0)rdisk(0)partition(1)\winnt35

    [operating systems]
    multi(0)disk(0)rdisk(0)partition(1)\winnt35="Windows NT 3.51"

  4. Boot from the floppy disk, and then log on to Windows.

Troubleshooting

You may experience one or more of the following problems when you try to start your computer with your Windows bootable disk:
  • If the path that points to the system files is incorrect or includes the drive letter, you may receive the following error message:
     
    Windows NT could not start because of the following ARC firmware boot configuration problem: Did not properly generate ARC name for HAL and system paths. Please check the Windows NT (TM) documentation about ARC configuration options and your hardware reference manuals for additional information. Boot Failed.
  • If an incorrect SCSI driver is selected or if the Ntbootdd.sys file does not exist, you may receive the following error message:
     
    Windows NT could not start because of a computer disk hardware configuration problem. Could not read from selected boot disk. Check boot path and disk hardware. Please check the Windows NT (TM) documentation about hardware disk configuration and your hardware disk configuration and your hardware reference manuals for additional information. Boot Failed.
  • If the Boot.ini file does not correctly reflect the correct %SystemRoot% folder for Windows, you may receive the following error message:
     
    Windows 2000 could not start because the following file is missing or corrupt:

    SystemRoot \System32\Ntoskrnl.exe
Change XP sp1 product Key
 

Use a WMI script that changes the volume licensing product key, and then deploy this script in a startup script. The sample ChangeVLKey2600.vbs script and the sample ChangeVLKeySP1 script that are described in this section use the new volume licensing key that you want to enter, in its five-part alphanumeric form, as a single argument. Microsoft recommends that you use the ChangeVLKey2600.vbs script on Windows XP-based computers that are not running SP1 and that you use the ChangeVLKeySP1.vbs script on Windows XP-based computers that are running SP1. These scripts perform the following functions:

They remove the hyphen characters (-) from the five-part alphanumeric product key.
They create an instance of the win32_WindowsProductActivation class.
They call the SetProductKey method with the new volume licensing product key.

You can create a batch file or a CMD file that uses either of the following sample scripts, together with the new product key as an argument, and either deploy it as part of a startup script or run it from the command line to change the product key on a single computer.

----------->
'
' WMI Script - ChangeVLKey.vbs
'
' This script changes the product key on the computer
'
'***************************************************************************

ON ERROR RESUME NEXT


if Wscript.arguments.count<1 then
Wscript.echo "Script can't run without VolumeProductKey argument"
Wscript.echo "Correct usage: Cscript ChangeVLKey.vbs ABCDE-FGHIJ-KLMNO-PRSTU-WYQZX"
Wscript.quit
end if

Dim VOL_PROD_KEY
VOL_PROD_KEY = Wscript.arguments.Item(0)
VOL_PROD_KEY = Replace(VOL_PROD_KEY,"-","") 'remove hyphens if any

for each Obj in GetObject("winmgmts:{impersonationLevel=impersonate}").InstancesOf ("win32_WindowsProductActivation")

result = Obj.SetProductKey (VOL_PROD_KEY)

if err <> 0 then
WScript.Echo Err.Description, "0x" & Hex(Err.Number)
Err.Clear
end if

Next

--------------|

ChangeVLKey2600.vbs

-------------->
'
' WMI Script - ChangeVLKey.vbs
'
' This script changes the product key on the computer
'
'***************************************************************************

ON ERROR RESUME NEXT

if Wscript.arguments.count<1 then
Wscript.echo "Script can't run without VolumeProductKey argument"
Wscript.echo "Correct usage: Cscript ChangeVLKey.vbs ABCDE-FGHIJ-KLMNO-PRSTU-WYQZX"
Wscript.quit
end if

Dim VOL_PROD_KEY
VOL_PROD_KEY = Wscript.arguments.Item(0)
VOL_PROD_KEY = Replace(VOL_PROD_KEY,"-","") 'remove hyphens if any
Dim WshShell
Set WshShell = WScript.CreateObject("WScript.Shell")
WshShell.RegDelete "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\WPAEvents\OOBETimer" 'delete OOBETimer registry value
for each Obj in GetObject("winmgmts:{impersonationLevel=impersonate}").InstancesOf ("win32_WindowsProductActivation")

result = Obj.SetProductKey (VOL_PROD_KEY)

if err <> 0 then
WScript.Echo Err.Description, "0x" & Hex(Err.Number)
Err.Clear
end if

Next

--------------|

The following example describes how to use the ChangeVLKeySP1.vbs script from a command line:

Click Start, and then click Run.

In the Open box, type the following command, where ab123-456ab-ab789-876ab-ab123 is the new product key that you want to use, and then click OK:

c:\changevlkeysp1.vbs ab123-456ab-ab789-876ab-ab123

Check active connections from CMD
 Go to Run: Type: cmd (win2k and XP) Type: command (95 and 98) Type: netstat -ano
Common Stop Messages and their meaning
 

List of the more common Stop Messages and their meaning

0x0000000A: IRQL_NOT_LESS_OR_EQUAL - Usually cause by bad driver or incompatible hardware/software.
0x00000012: TRAP_CAUSE_UNKNOWN - Indicates a trap from an unknown cause. Check the Microsoft Hardware Compatibility List to verify that the hardware and its drivers are compatible with Windows 2000.
0x0000001A: MEMORY_MANAGEMENT - Indicates a general memory management problem. If you are installing Windows 2000 for the first time, check the Windows 2000 system requirements, including the amount of RAM and disk space required to load the operating system.
0x0000001E: KMODE_EXCEPTION_NOT_HANDLED - Indicates that a kernel-mode exception was not handled. Usually, the exception address pinpoints the driver/function that caused the problem.
0x00000023: FAT_FILE_SYSTEM - Naturally caused by a FAT file system problem. If this is the first time you have booted after installing new hardware, remove the hardware and boot again.
0x00000024: NTFS_FILE_SYSTEM - A problem occurred within NTFS.SYS (the driver file that allows the system to read and write to NTFS file system drives.) There may be a physical problem with the disk, or an IRP may be corrupted.
0x0000002E: DATA_BUS_ERROR - Usually caused by defective RAM(on motherboard or video card). Also can be an indication of damamge to the hard drive due to a virus.
0x00000044: MULTIPLE_IRP_COMPLETE_REQUESTS - Most often caused by a hardware driver issue.
0x00000050: PAGE_FAULT_IN_NONPAGED_AREA - The requested data was not in memory. Caused by defective memory or incompatible software. Sometimes a hardware problem.
0x00000051: REGISTRY_ERROR - Pretty obvious that this is a registry issue. Usually a registry or configuration management issue.
0x00000058: FTDISK_INTERNAL_ERROR - Indicates an inconsistency between pages in the primary and secondary data caches. This is a fault-tolerant disk driver internal error.
0x0000005A: CRITICAL_SERVICE_FAILED - A critical service failed to initialize while starting the LastKnownGood control set. If this is the first time you have booted after installing new hardware, remove the hardware and boot again.
0x00000077: KERNEL_STACK_INPAGE_ERROR - Kernel data requested from the pagefile could not be found or read into memory. This message also may indicate disk hardware failure,data corruption, or virus.
0x0000007A: KERNEL_DATA_INPAGE_ERROR - Kernel data requested from the pagefile could not be found. Possibly due to incompatible disk or controller drivers, or hardware.
0x0000007B: INACCESSIBLE_BOOT_DEVICE - Caused by installing incorrect device drivers when installing or upgrading storage adapter hardware, or a virus.
0x0000008E: KERNEL_MODE_EXCEPTION_NOT_HANDLED - Almsot always caused by a hardware compatibility issue.
0x000000A5: ACPI_BIOS_ERROR - Errors in the ACPI BIOS. Nothing can be done at an operating system level to fix the problem.
0x000000B4: VIDEO_DRIVER_INIT_FAILURE - Video driver failed to initialize, video driver issue.
0x000000BE: ATTEMPTED_WRITE_TO_READONLY_MEMORY - Commonly occurs after installing a faulty device driver. To to correct the problem try disabling or removing the driver.
0x000000D1: DRIVER_IRQL_NOT_LESS_OR_EQUAL - The system attempted to access pageable memory using a kernel process IRQL that was too high. The most typical cause is a bad device driver.
0xC0000135: UNABLE TO LOCATE DLL - Windows attempted to load a DLL file and encountered an error condition. So of the possible causes are that the file is missing or damaged, or that the is Registry is corrupt.
0xC0000221: STATUS_IMAGE_CHECKSUM_MISMATCH - Possibly caused by driver problems, system file problems, disk corruption problems or faulty memory.
There are many many other STOP ERROR Messages that can be recieved, this is only a short compilation of some

Convert any files to word format
 

'Extend the array boundries and add more entries and it should work
' HAVE FUN!
Option Explicit
Private extension(1)
extension(0) = ".txt"
Dim objArgs, argc, spellchk, objFSO, path, objFolder, filecollection, filename, objFile, i, ptr, wordin, wordfile, oDoc, myRange, stat, n, v
Set objArgs = WScript.Arguments
If objArgs.Count < 1 or objArgs.Count > 2 Then
Call Script_Error
End If
Wscript.echo "Text File conversion tool"
Wscript.echo "by James Lane"
wscript.echo ""
wscript.echo "Note: Formatting of files may be lost"
wscript.echo ""
argc = 0
spellchk = 0
Set objFSO = CreateObject("Scripting.FileSystemObject")
Do While argc < CInt(objArgs.Count)
Select Case objArgs(argc)
Case "-s"
spellchk = 1
Case Else
If objFSO.FolderExists(objArgs(argc)) Then
path = objArgs(argc)
Else
Wscript.Echo "Folder does not exist."
Call Script_Error
End If
End Select
argc = argc + 1
Loop
Set objFolder = objFSO.GetFolder(path)
Set filecollection = objFolder.Files
For Each filename In filecollection
Set objFile = objFSO.GetFile(filename)
If objFile.Size > 0 Then
Set objFile = objFSO.OpenTextFile(filename, 1)
If ext(filename) Then
wordin = objFile.ReadAll
wscript.echo "File: " & filename
wscript.echo ""
wordfile = Left(filename, Len(filename) - 4) & ".doc"
Call makeword(wordfile, wordin, spellchk)
wscript.echo ""
End If
End If
Next

Sub Script_Error
WScript.Echo ""
WScript.Echo "Converts txt files to word documents"
WScript.Echo ""
WScript.Echo "Usage: word.vbs [-s] folder"
WScript.Echo ""
WScript.Echo "Options : "
WScript.Echo ""
WScript.Echo "     -s    Runs a SpellCheck on the files as they are converted"
WScript.Echo ""
WScript.Quit
End Sub

Sub makeword(file, content, spellchk)
Set oDoc = CreateObject("Word.Document")
oDoc.Content = content
If spellchk = 1 Then
oDoc.CheckSpelling
oDoc.CheckGrammar
Set myRange = oDoc.Content
For Each stat In myRange.ReadabilityStatistics
n = stat.Name
v = stat.Value
Wscript.Echo "" & n & " : " & v & ""
Next
End If
oDoc.SaveAs file
wscript.sleep 1000
oDoc.Close
Set oDoc = Nothing
End Sub

Function ext(filename)
For i = 0 to (UBound(extension) - 1)
ptr = InstrRev(filename, extension(i), -1, 1) - 1
If (ptr + Len(extension(i))) = Len(filename) Then
    ext = true
    Exit For
Else
ext = false
End If
Next
End Function

The above converts txt files to word documents

Usage: word.vbs [-s] folder
Options : -s Runs a SpellCheck on the files as they are converted

Create a Bootable Disk for an NTFS or FAT Partition
 
This article describes how to create a Windows bootable(startup) disk to access a drive with a faulty boot sequence on an Intel-based computer.

Note The procedure for RISC-based computers is different and not documented in this article.

You may be able to use a Windows bootable disk to start the operating system on a computer running Windows NT or Windows 2000. Use the procedures in this article to work around the following boot problems:

  • Damaged boot sector
  • Damaged master boot record (MBR)
  • Virus infections
  • Missing or damaged Ntldr or Ntdetect.com files
  • Incorrect Ntbootdd.sys driver
  • To boot from the shadow of a broken mirror

    Note that you may have to modify the Boot.ini file to do this.
Note that you cannot use the Windows Emergancy Repair disk (ERD) to help resolve the following problems:
  • Incorrect or damaged device drivers that are installed in the System folder.
  • Boot problems that occur after you see the Windows Startup (Osloader) screen.
To work around or fix these problems, run the ERD, load the last known good control set, or reinstall Windows.

How to Create a Windows Bootable Disk

The Windows boot disk must include the Ntldr (or Setupldr.bin in Windows NT 3.5),Ntdetect.com, and Boot.ini files, and may require ntbootdd.sys which is the device driver for your hard disk controller renamed to ntbootdd.sys.

Note The Ntldr, Ntdetect.com, and Boot.ini files typically have their file attributes set to system, hidden, or read-only. You do not have to reset these attributes for the bootable disk to work. For additional information about the structure of the Boot.ini file, click the article number below to view the article in the Microsoft Knowledge Base:

102873 BOOT.INI and ARC Path Naming Conventions and Usage

To create a Windows bootable floppy disk, use one of the following methods.

If You Do Not Have Access to a Computer Running Windows

  1. Create a copy of the first Windows Setup disk by using the diskcopy command. To do this:
    1. Click Start, and then click Shut Down.
    2. Click Restart the computer in MS-DOS mode, and then click Yes.
    3. At a command prompt, type the following command, where <a> is the drive that contains the Windows Setup disk and <b> is the drive that contains the blank floppy disk that you want to become the Windows startup disk:

      diskcopy a: b:

  2. Copy both the Ntdetect.com and Ntldr files from the I386 folder on the Windows CD-ROM to the new floppy disk.
  3. Rename the Ntldr file to Setupldr.bin.
  4. Create a Boot.ini file.

    The following sample Boot.ini file provides an example for a single partition SCSI drive with Windows installed in the Winnt folder; however, the exact value in the [operating systems] section depends on the configuration of the Windows computer that you want to start up:

    [boot loader]
    timeout=30
    Default= scsi(0)disk(0)rdisk(0)partition(1)\winnt

    [operating systems]
    scsi(0)disk(0)rdisk(0)partition(1)\winnt="Microsoft Windows 2000 Advanced Server" /fastdetect

    If your computer boots from an IDE, EIDE, or ESDI hard disk, replace scsi(0) with multi(0). If you are running Windows NT 3.5 or Windows NT 3.51 and your computer boots from the first or second SCSI drive, then you can also replace scsi(0) with multi(0).

    If you are using scsi(x) in the Boot.ini file, copy the correct device driver for the SCSI controller that is in use on the computer, and then rename it to Ntbootdd.sys. If you are using multi(x) in the Boot.ini file, you do not have to do this.
  5. Start your computer by using the startup disk, and then log on to Windows.

If You Have Access to a Computer That Is Running Windows

  1. On the computer that is running Windows, format a floppy disk by using the full format option in the Windows NT utility. To do so, type format a: at a command prompt, and then press ENTER.

    Notes
    • You cannot format the floppy by using Microsoft Windows 95, Microsoft Windows 98, or Microsoft Windows Millennium Edition.
    • You must perform a full format to properly rewrite any boot sector content on the floppy disk. A full format prevents boot sector viruses from running.
    • If you perform a quick format on the first Windows Setup bootable floppy disk, the boot sector keeps a reference to the Setupldr.bin file and requires that you rename the Ntldr file to Setupldr.bin.
  2. Copy the Ntldr file from the Windows CD-ROM or from a computer that is running the same version of Windows as the computer that you want to access with the startup floppy disk. In Windows 2000, the NTLDR file is found in the I386 folder on the Windows 2000 CD-ROM. For Windows NT 4.0, you can copy this file from the Windows NT 4.0 CD-ROM.

    Note In versions of Windows earlier than Windows NT 4.0, you may have to expand the file from NTLDR._ to NTLDR by typing the following command at a command prompt:

    expand ntldr._ ntldr

  3. Copy the Ntdetect.com file to the floppy disk that you formatted in step 1.
  4. Create a Boot.ini file on the floppy disk that you formatted in step 1. You can also copy the file from another computer that is running Windows and then modify it to match the computer that you are creating the startup disk for. The following example works for a single-partition SCSI drive with Windows 2000 Advanced Server installed in the Winnt folder, but the exact value in the [operating systems] section depends on the configuration of the Windows-based computer that you are creating the startup disk for:

    [boot loader]
    timeout=30
    Default= scsi(0)disk(0)rdisk(0)partition(1)\Winnt

    [operating systems]
    scsi(0)disk(0)rdisk(0)partition(1)\WINNT="Microsoft Windows 2000 Advanced Server" /fastdetect

    If your computer starts from an IDE, EIDE, or ESDI hard disk, replace scsi(0) with multi(0). If you are using a computer that is running Windows NT 3.5 or Windows NT 3.51 and your computer starts from the first or second SCSI drive, then you can also replace scsi(0) with multi(0). For example:

    [boot loader]
    timeout=30
    default=multi(0)disk(0)rdisk(0)partition(1)\WINNT
    [operating systems]
    multi(0)disk(0)rdisk(0)partition(1)\WINNT="Microsoft Windows 2000 Advanced Server" /fastdetect
     

    If you are using scsi(x) in the Boot.ini file, copy the correct device driver for the SCSI controller that is in use on the computer, and then rename it Ntbootdd.sys. If you are using multi(x) in the Boot.ini file, you do not have to do this.

    Note By default, Windows 2000 is installed to the C:\Windows folder. However, if the computer is using an earlier version of Windows, or if the computer was upgraded to Windows 2000 from an earlier version of Windows, then by default, Windows 2000 is installed to the C:\WINNT folder. Verify that the Boot.ini file shows the correct %SystemRoot% folder for Windows.
  5. Start your computer by using the startup disk, and then log on to Windows.

If You Are Using Windows NT 3.51

  1. Format a blank floppy disk in Windows NT 3.51.
  2. Copy both the Ntdetect.com and Ntldr files to the new disk.
  3. Create a Boot.ini file with the following lines (note that this example is for a single partition SCSI drive with Windows NT installed in the default folder, C:\Winnt35):

    [boot loader]
    timeout=30
    Default= multi(0)disk(0)rdisk(0)partition(1)\winnt35

    [operating systems]
    multi(0)disk(0)rdisk(0)partition(1)\winnt35="Windows NT 3.51"

  4. Boot from the floppy disk, and then log on to Windows.

Troubleshooting

You may experience one or more of the following problems when you try to start your computer with your Windows bootable disk:
  • If the path that points to the system files is incorrect or includes the drive letter, you may receive the following error message:
     
    Windows NT could not start because of the following ARC firmware boot configuration problem: Did not properly generate ARC name for HAL and system paths. Please check the Windows NT (TM) documentation about ARC configuration options and your hardware reference manuals for additional information. Boot Failed.
  • If an incorrect SCSI driver is selected or if the Ntbootdd.sys file does not exist, you may receive the following error message:
     
    Windows NT could not start because of a computer disk hardware configuration problem. Could not read from selected boot disk. Check boot path and disk hardware. Please check the Windows NT (TM) documentation about hardware disk configuration and your hardware disk configuration and your hardware reference manuals for additional information. Boot Failed.
  • If the Boot.ini file does not correctly reflect the correct %SystemRoot% folder for Windows, you may receive the following error message:
     
    Windows 2000 could not start because the following file is missing or corrupt:

    SystemRoot \System32\Ntoskrnl.exe
Create XP system path
 

applies to Windows 2000, XP

1. Right-click on the My Computer icon. (Under Windows XP, the My Computer Icon may be located in the start menu.)

2. Choose Properties from the context menu.

(Alternatively, you can double-click on the System icon in the Control Panel)

4. Click the Advanced tab.

5. Click the Environment Variables button.

6. Add the target directory to the end of the Path using a semi-colon as a separator. For example, if you want to add the path to MATLAB/bin to your system, which is located
at c:\roger\bin, you would enter the following at the end of the Path:

 


;c:\roger\bin


7. Restart your computer for your changes to take affect.

dial-up configuration
 

How to setup auto dial up to connect to ISP

To connect ISP automatically when run IE, open IE>Tools>Internet Options>Connection, check Always dial my default connection.

Different Raid types with explanations
 

RAID (Redundant Array of Inexpensive Disks) is a method of combining multiple hard drives for data redundancy in case of a hard drive failure.

The different types of supported RAID configurations are:

RAID 0

RAID 0 uses a technique called data striping. Multiple hard drives are combined to make one large volume. RAID 0 can read and write faster than a non-RAID configuration, since it splits the data and accesses both drives in parallel. RAID 0 does not provide any data redundancy. RAID 0 requires at least two hard drives.

RAID 1

RAID 1 mirrors or duplicates the content of one drive onto another equally sized drive. Mirroring provides optimal data integrity and immediate access to your data if one drive fails. RAID 1 allows you to use only half of the available capacity of your NAS device. RAID 1 requires at least two hard drives and must consist of an even number of drives.

RAID 5

RAID 5 provides the best balance of data redundancy, performance and capacity. RAID 5 is the default RAID configuration for the Iomega® NAS. Like RAID 0, RAID 5 stripes all of the available drives into one large volume; however, the space equivalent to one of the hard drives will be used to store parity data. If one hard drive fails, your NAS will rebuild your data using the parity data. RAID 5 requires at least 3 hard drives. You may also use a RAID 5 configuration with hot spare, which reserves an additional hard drive that is swapped in immediately if a drive failure occurs. The total RAID capacity is the sum of all the hard drives minus the space of two drives. RAID 5 with hot spare requires at least 4 hard drives.

Non-RAID

In addition to RAID, you can also configure your NAS without using a RAID configuration. A non-RAID configuration, also referred to as JBOD (Just a Bunch Of Disks), does not allow any data redundancy and is slower than some RAID configurations.

  

Disable or Enable Local area Connection via script
 

Toggle LAN Connection script

Const ssfCONTROLS = 3

sConnectionName = "Local Area Connection"

sEnableVerb = "En&able"
sDisableVerb = "Disa&ble"

set shellApp = createobject("shell.application")
set oControlPanel = shellApp.Namespace(ssfCONTROLS)

set oNetConnections = nothing
for each folderitem in oControlPanel.items
  if folderitem.name  = "Network and Dial-up Connections" then
    set oNetConnections = folderitem.getfolder: exit for
  end if
next

if oNetConnections is nothing then
  msgbox "Couldn't find 'Network and Dial-up Connections' folder"
  wscript.quit
end if

set oLanConnection = nothing
for each folderitem in oNetConnections.items
  if lcase(folderitem.name)  = lcase(sConnectionName) then
    set oLanConnection = folderitem: exit for
  end if
next

if oLanConnection is nothing then
  msgbox "Couldn't find '" & sConnectionName & "' item"
  wscript.quit
end if

bEnabled = true
set oEnableVerb = nothing
set oDisableVerb = nothing
s = "Verbs: " & vbcrlf
for each verb in oLanConnection.verbs
  s = s & vbcrlf & verb.name
  if verb.name = sEnableVerb then
    set oEnableVerb = verb 
    bEnabled = false
  end if
  if verb.name = sDisableVerb then
    set oDisableVerb = verb 
  end if
next

'debugging displays left just in case...
'
'msgbox s ': wscript.quit
'msgbox "Enabled: " & bEnabled ': wscript.quit

'not sure why, but invokeverb always seemed to work
'for enable but not disable. 
'
'saving a reference to the appropriate verb object
'and calling the DoIt method always seems to work.
'
if bEnabled then
'  oLanConnection.invokeverb sDisableVerb
  oDisableVerb.DoIt
else
'  oLanConnection.invokeverb sEnableVerb
  oEnableVerb.DoIt
end if

'adjust the sleep duration below as needed...
'
'if you let the oLanConnection go out of scope
'and be destroyed too soon, the action of the verb
'may not take...
'
wscript.sleep 1000

Info:

To be 100% robust, you should enable inline error handling and explicitly test for "not implemented" and use an alterative approach of an enumerated search of the Folder's FolderItems collection (returned by the Items() method) looking for a FolderItem.Name match. 

If you need the Folder interface rather that FolderItem, use the FolderItem.GetFolder property (yes, it  is  a property despite a method-like name;-).  On the other hand, if you have a Folder interface
and want its FolderItem interface, use the Folder.Self property.  Note the Self was added as of Windows 2000.

Disable XP simplified sharing
 

By default, simple file sharing is enabled on a Windows XP-based computer if the computer is not a member of a domain. simple file sharing lets you easily share folders with everyone on your workgroup or network and make folders in your user profile private. However, if simple file sharing is enabled, you cannot prevent specific users and groups from gaining access to your shared folders. If you disable simple file sharing, you can allow specific users and groups to gain access to a shared folder.Those users must be logged on with the credentials of user profiles that you've granted access, in order to gain access to your shared folder.

If simple file sharing is enabled, you see the simple file sharing user interface rather than the classic Security and Sharing tabs. By default, this new user interface is implemented in Windows XP Home Edition and in Windows XP Professional if you are working in a workgroup. If you disable simple file sharing, the classic Security and Sharing tabs appear, and you can specify which users and groups have access to shared folders on your computer.

Note You can set security only on a partition that uses the NTFS file system. If you remove the Everyone group from the NTFS permissions, you cannot use the file or folder over the network.

How to disable simple file sharing

  1. Click Start, and then click My Computer.
  2. On the Tools menu, click Folder Options, and then click the View tab.
  3. In the Advanced Settings section, click to clear the Use simple file sharing (Recommended) check box.
  4. Click OK.

How to share a folder or a drive with other people

  1. Click Start, click My Computer, and then locate the folder or drive you want to share.
  2. Right-click the folder or drive, and then click Sharing and Security.
  3. On the Sharing tab, click Share this folder.
  4. To change the share name of the shared folder or drive, type a new name in the Share name box. The new name is what other people see when they connect to this shared folder or drive. The actual name of the folder or drive does not change.
  5. To add a comment about the shared folder or drive, type the text in the Comment box.
  6. To limit the number of people who can connect to the shared folder or drive at one time, click Allow under User limit, and then type the number of users.
  7. To set shared folder permissions on the shared folder or drive, click Permissions.

    Note To share folders and drives, you must be logged on as a member of any one of the following groups:
    • Administrators
    • Server Operators
    • Power Users

Troubleshooting

  • The Sharing tab is not visible.

    Try using the Services snap-in to start the Server service. To do so:
    1. Click Start, and then click Control Panel.
    2. Click Performance and Maintenance, click Administrative Tools, expand Services and Applications, and then double-click Services.
    3. Right-click the Server service, and then click Start.
  • The folder is already shared.

    Click New Share, and then type the new share name.
  • You want to hide the shared folder.

    To hide the shared folder, type $ as the last character of the share name. Other uses cannot see this shared folder when they search by using My Computer or Windows Explorer, but they can map to the shared folder.
  • Other users occasionally cannot use your shared folder.

    No more than 10 other people can connect to your computer at one time if you are using Windows XP Professional. In Windows XP Professional, the maximum user limit is 10, regardless of the number you type in the Allow box.

You can use the Shared Folders snap-in to create and manage shared folders, view a list of all the users who are connected to a shared folder over a network, disconnect one or all of them, view a list of files opened by remote users, and close one or all the open files. To start the Shared Folders snap-in:

  1. Click Start, and then right-click My Computer.
  2. Click Manage, and then click Shared Folders

 

KB: 307874

Display Legal Notices at Logon
 Windows NT can display a message dialog box with the text of your choice when a user logs on. Many organizations use this message box to display a warning message that notifies users that they can be held legally liable if they attempt to use the computer without proper authorization. The absence of such a notice could be construed as an invitation, without restriction, to enter and browse the system. Consult with your attorney as to the best wording.

You can use the logon notice in special scenarios, such as when NT serves as an information kiosk. In this case, users might need instructions for supplying a user name and password for the appropriate account. This message dialog box could supply that information in addition to legal notices.

To display a legal notice on your NT system, use the Registry Editor to create or assign the following registry key values:

Hive:  HKEY_LOCAL_MACHINE
Key:  Software\Microsoft\WindowsNT\
  Current Version\Winlogon
Name:  LegalNoticeCaption
Data Type: REG_SZ
Value:  Title shown on the logon notice dialog box

Hive:  HKEY_LOCAL_MACHINE
Key:  Software\Microsoft\WindowsNT\
  Current Version\Winlogon
Name:  LegalNoticeText
Data Type: REG_SZ
Value:  Text shown in the logon notice dialog box
  
Domain FAQ's
 

Cannot logon after removing the domain

I have a windows 2000 professional laptop workstation. I used to belong to a domain on my network, but I recently
changed by network settings to belong to a workgroup. Once I restarted my machine, it won't let me log into windows 2000 at all!  The error says wrong user name or domain.  For some reason, I think it's trying to access the domain - even though I don't belong to it anymore. Even when I'm not connected to the network, I cannot log into windows 2000 at all.  How can I get into windows 2000?  How can I change this?!

A: After changing the domain to a workgroup, only the member of local administrators can logon the computer. the resolutions: 1. logon the local administrator to local computer and add the users. 2. If you don't have the administrator password, you may need your network administrator to help you.

Can't remove a computer from a domain

Symptom: When trying to move the computer off of the domain and into a workgroup the following error message is displayed, "The computer could not be removed from the domain <domain name>.  The revision level is unknown."

Resolution: the problem is you may logon local administrator instead of domain administrator. Re-logon domain administrator.

Cannot find the WINS server.

SYMPTOMS: After you install the Windows Internet Name Service (WINS) component, you may not be able to gain access to the WINS database on the local WINS server. When you try to gain access to the WINS database, you may receive the following error message: "Cannot find the WINS server", "The WINS server you specified cannot be located", "The WINS server might be down, there might be network problems, or the WINS service might not be installed", and "The network path was not found".

RESOLUTION: When WINS Manager starts, it tries to contact the File Server service on the WINS server. Specifically, WINS Manager checks for NetBIOS suffix 20 on the WINS server. If File and Printer Sharing is disabled, it disables the File Server service and NetBIOS suffix. You must have File and Printer Sharing enabled to use WINS.

Cannot Add Windows 2000 Computer to Domain: The Network Path Was Not Found

SYMPTOMS: When trying to join a Win2K/XP computer to a domain, you receive the following error message: The following error occurred when attempting to join "domain name". The network path was not found.

RESOLUTION: 1) make sure you are using an correct IP for the DNS. 2) make sure you have correct DNS and WINS server on your network. 3) try to enable NetBIOS over TCP/IP on Win2K/XP if this is NT domain controller.

How to access different domain without changing the network settings

 To use a laptop to access to different domain without changing the domain settings, logon local machine (instead of domain) using your domain logon ID that also are created on your local computer. If it is possible, you may create the same logon id and password on all domain so that you always are able to access the domain you are connecting to. Also you may want to create one batch file like logon.bat with domain logon ID and password to map network drives.

How to change the network information for a Domain Controller

When you try to change the network information to a domain comptroller, you find the Network ID and Properties buttons will not be available. The way to change the network information on a domain controller would be to demote the controller to a member server, change the necessary information, and then promote the server back to a domain controller.

How to check who is logging on a particular computer

If you would like to check who is  logging on a particular PC in the (same subnet) network, you can use command nbtstat -a computername. That will show NetBIOS Remote Machine Name Table such as username, <03>, type and status.

How to map a network drive without logon the domain

If you have a laptop used at home and sometimes used in the office, you would  like to map a network drive without logon the domain, you can create a batch file like that  “net use h: \\ervername\sharename password /user:domainname\username".

How to synchronize the time on all the computers in a network

To synchronize the time on all the computers in a network, create a logon script and use net time command, for example, net time \\computername /set /yes.

How to switch network settings without reboot

As a network consultant, I work on different network every day and need to switch network settings such as IP and DNS accordingly. Fortunately, W2K/XP comes with a useful tool, netsh.exe, that can switch network settings quickly.  To copy abc.com network settings, type command netsh -c interface dump >c:\abc.txt. The abc.com network settings will be saved at the root of the C drive. You can create as many network settings as I like. When you work at abc.com next time,  you will load the settings by typing netsh -f abc.txt command and the abc.com network settings will take effect immediately.

How to verify if you are logged on to the domain and  which server you are logging on

To verify if you are logging on to the domain and  which server you are logging on, at a command prompt, type set, and then press ENTER. Look for the LOGONSERVER entry. If it is set to the name of your computer, you were logged on using cached domain credentials. If you are logging on the domain, the LOGONSERVER entry is set to one of the domain controllers.

How can I synchronize all computers' time in the network?

A: You as an Administrators can configure an internal time server as authoritative by using the net time command.

You can also configure the Time Service on the AD to recognize an external Simple Network Time Protocol (SNTP) time server as authoritative. Use the following net time command: net time /setsntp:server_list. Note: 1) The United States Naval Observatory runs several SNTP time servers that are satisfactory for this function, for example, ntp2.usno.navy.mil (at 192.5.41.209) and tock.usno.navy.mil (at 192.5.41.41). 2) that SNTP uses User Datagram Protocol (UDP) port 123. If this port is not open to the Internet, you cannot synchronize your server to Internet SNTP servers.

After you set the SNTP time server as authoritative, run the following command on computers other than the domain controller to reset the local computer's time against the authoritative time server: net time \\servername /set /yes.

How do I un-synchronize time on my domain network?

Q:  I have an isolated Windows 2000/NT domain for I/O testing. I want to change TIME on one of my W2K server; however after approx. 30min. the TIME of this server was reset back to my domain time.

A:  You can disable the 'Windows Time' service on the computer you don't want to update.

Mapping problem - persistent connection

After you changed net use I: \\serverA\shared  to \\serverB\shared in your logon script, some windows 2000 machines are still mapping to \\serverA\shared. The reason is that net use /persistent:yes is default settings for NT and win2000/XP.   You can disconnect the old mapping and re-logon. That will map to \\cbgntB\shared.  Also you may want to use NET USE I: \\servername\folder /persistent:no so that next time when we change the mapping, it will automatically map to the new settings.

Problem with License Manager
I have followed the instructions in Q153140 and Q194065 on how to reset License Manager information.  Two days later, I am getting warnings in my Event Logs that my Windows Server is out of licenses.  Its finding ghost users that have been deleted from my system for 3-4 years  How do I  really delete their licenses and  make them stop coming back?

A: Many  people have reported the same problem. You may want to disable the License Manager and manage the licenses manually.

Slow Network Performance Occurs while copying file to W2K Domain Control

A: Symptom: when copying files from a client computer to W2K domain controller, network performance is slower. You may notice this problem occurs only if you copy many small files but not copy a few large files. Resolution: 1) apply SP3 on the W2K domain controller; 2) edit the TcpDelAckTicks registry value to adjust the TCP delayed ACK timer (refer to MS Q321098).

Unable to logon domain or experience an extremely slow logon -  Event ID: 1054

Symptoms: 1) clients cannot obtain the domain controller name for your computer network. (The specified domain either does not exist or could not be contacted). 2) Group Policy processing aborted. 3) The clients  may also experience an extremely slow logon.

Resolution:

1) Check you DHCP, WINS and DNS server settings and make sure they are working.
2) ipconfig /all on clients shows correct DNS and WINS.
3) If you do not use DHCP, you need to add DNS in the properties of TCP/IP. 4) if you have more than one NICs and one of them does not plug, disable it.

"The network path was not found" error

When attempting to join "domain name", you get this error "The network path was not found". This behavior can occur if you are using an incorrect Internet Protocol (IP) address for the Domain Name Service (DNS) server or have incorrected WINS settings. To resolve this behavior, make sure that the IP addresses of the DNS and WINS servers on your network are specified correctly in your TCP/IP settings.

Why W2K/XP clients logon so slower

1) Slow logon from W2K/XP to a win2000 domain usually indicates a DNS and WINS configuration issue. If DNS/WINS is configured uncorrected, XP will take longer time to search DNS/WINS and will be time out if it can't find the DNS/WINS. 2) Servers and clients have more than one protocols such as TCP/IP, NetBEUI and IPX. 3) If you have one unplugged and enable network adapter on the computer, you should disable it.

Download IE6 and Install Later
 

First, download the IE6 SP1 setup program from HERE (500kb basic setup program. The full IE package might go as high as ~44mb depending upon your selection). This tip will let you customize the d/l parameters.

Go to the folder where you've placed the above file. Open a Command Prompt (CMD) in that folder, then run the following command in the CMD window:

ie6setup.exe /c:"ie6wzd.exe /d /s:""#E"

Note: Just copy and paste the above line. Don't try to be a wise guy. Copy the damn line! I've received quite a few feedbacks about the accuracy of this tip, and always they got the syntax wrong. Copy and paste! Oh, and yes, this tip works for IE 6 SP1 too, and so will older IE versions. Just replace the "6" in the previous line with a "5" and so on.

You can also choose to download all IE versions in one go. For example, if you choose to download the version for Win9X, the version for NT, the version for W2K, and the version for Win ME - all the files will go to one location - a folder named "Windows Update Setup Files" - and you can then burn this folder to a CD and use it to install IE on any OS version you want.

Error: 678, 721, 691 and 777 after XP upgrade
 

When you try to establish a dial-up connection after you upgrade your computer to Microsoft Windows XP from Microsoft Windows 98, from Microsoft Windows 98 Second Edition, or from Microsoft Windows Millennium Edition (Me), you may receive an error message that is similar to one of the following:


Error 721: The remote computer is not responding.
Error 678: The remote computer failed to respond.
Error 691: Access was denied because the user name and/or password was invalid on the domain.
Error 777: The connection attempt failed because the modem or other connecting device on the remote computer is out of order.

This issue may occur if the modem driver is not compatible with Windows XP. This issue has been reported to occur with Lucent Win modems that are included with the following Hewlett-Packard (HP) computers:
HP Pavilion 6736
HP Pavilion 6745c
HP Pavilion 7400
HP Pavilion 7800
HP Pavilion 7845
HP Pavilion 7850
HP Pavilion 7855
HP Pavilion 7940
HP Pavilion 8655
HP Pavilion 8756c
HP Pavilion XT846
HP Pavilion XT856
HP Pavilion XT923

To resolve this issue, contact the hardware manufacturer to inquire about how to obtain and install the latest Windows XP-compatible driver for the modem. For more information about how to contact HP, visit the following HP Web site:
http://welcome.hp.com/country/us/eng/software_drivers.htm
Microsoft provides third-party contact information to help you find technical support. This contact information may change without notice. Microsoft does not guarantee the accuracy of this third-party contact information.
For more information about how to contact Agere Systems (the manufacturer of the modem chipset) to inquire about a modem driver that is compatible with Windows XP, visit the following Agere Web site:
http://www.agere.com/support

314455 "Error 691" error message when you try to connect to your ISP
308022  Resources for troubleshooting modem problems in Windows XP

Exchange 2003 OWA error
 There are three methods to resolve this problem.
  • You can modify the SMTP address of, or add a new SMTP address to, the users who are encountering the error described in the "Symptoms" section of this article. You may want to do this if the problem is confined to a few users or only users who have incorrect SMTP addresses.
  • Modify the SMTP domain serviced by the Exchange virtual directory. You may want to do this if most or all of the users in your organization are encountering the error described in the "Symptoms" section of this article.
  • Create additional virtual directories for additional SMTP domains. You may want to do this if your organization has multiple SMTP domains or if you are using Exchange 2000 for hosting.

    NOTE: You can also create additional HTTP Virtual Servers for additional SMTP domains. This process is more involved than the scope of this article. To set up additional HTTP virtual servers, please see the online Help for Exchange 2000 Sever by visiting following Microsoft Web site:

    http://www.microsoft.com/exchange/en/60/exhelp/

    Click Outlook Web Access, then click How To..., , and then click Create a New HTTP Virtual Server.

Method 1: Correct or Add an SMTP Address to a User

  1. Start the Active Directory Users and Computers snap-in.
  2. Obtain properties of the user in question. (Users can exist in more than one Organizational Unit but, by default, they are created in the Users OU.)
  3. Click the E-mail Addresses tab.
  4. If you want to add an SMTP address to this user, click New, double-click SMTP Address, and then type an address that matches the Mailboxes For value noted from properties of the Exchange virtual directory.
  5. If you want to modify an existing SMTP address, click the address that you want to modify, click Edit, and type an address that matches the Mailboxes For value.
  6. Click OK twice.
There may be replication latency in the Active Directory before this user is able to log in to OWA.

NOTE: It is not important that the default (bold) SMTP address of a user match the Mailboxes For value; any of the SMTP address can match.

Method 2: Modify the SMTP Domain Serviced by the Exchange Virtual Directory

In the property sheet for the Exchange virtual directory, the Modify button is not available (appears dimmed). This is because the SMTP domain used by the Exchange virtual directory will always be the default SMTP domain assigned by the Default Recipient Policy.

To modify that default SMTP domain, follow these steps.

NOTE: These steps include restarting the Microsoft Exchange Information Store and its dependent services. While the Information Store is stopped, no clients can access e-mail.
  1. Start Exchange System Manager.
  2. Expand the Recipients container.
  3. Select the Recipient Policies object.
  4. In the right pane, locate the Default Policy and obtain the properties.
  5. Click the E-mail Addresses tab.
  6. Double-click the SMTP address. If there is more than one SMTP address listed, double-click the one in bold.
  7. Leave the "@" (at sign) at the beginning and type the SMTP domain you want in the Address field.
  8. Click OK twice.
  9. Start the Services snap-in.
  10. Select the Microsoft Exchange Information Store service.
  11. Click the Restart Service button on the Microsoft Management Console (MMC) toolbar. When prompted to restart dependent services, click Yes. The Mailboxes For value will be updated to use your new SMTP domain.

Method 3: Create Additional Virtual Directories for Additional SMTP Domains

NOTE: If the computer is a front-end/back-end solution, you must create the virtual directories on both the front-end servers and the back-end servers.
  1. Start Exchange System Manager.
  2. Locate the Servers/server name/Protocols/HTTP/Exchange Virtual Server folder.
  3. Right-click the Exchange Virtual Server, click New, and then click Virtual Directory.
  4. Type the name of the new virtual directory.

    This name will appear in the URL used by clients to access this new virtual directory. For example, if you create a new virtual directory named companybmail, clients will have to access a URL similar to http://www.domain.com/companybmail/.
  5. To select an SMTP domain, click the Modify button, and then select an SMTP domain from the list.NOTE: This list is generated from all SMTP Address values in all recipient policies defined in your Exchange organization. You cannot supply an SMTP domain that does not appear in this list.
For more information about recipient policy management, please see the Exchange 2000 online help topic, "Managing Recipient Settings", and then click Managing Recipient Policies.

To customize authentication methods, click the Authentication button on the Access tab.

For more information about authentication methods, see the Microsoft Internet Information Server 5.0 Help topic "About Authentication," available at http://localhost/iishelp.

MORE INFORMATION

To determine the appropriate Simple Mail Transfer Protocol (SMTP) address, follow these steps:
  1. Start Exchange System Manager.
  2. Browse to Servers/server name/Protocols/HTTP/Exchange Virtual Server/Exchange.
  3. Get properties of the Exchange virtual directory.

    This is the default OWA virtual directory created during Exchange Server Setup.
  4. On the General property sheet, note the value from the field labeled Exchange Path. An example of this value is "company.com (default)." In this example, only users with an SMTP address ending with @company.com can use the Exchange virtual directory to access their mailboxes.
Exchange server 2003 sp1 issues
 
When you use the Microsoft Exchange Server 2003 version of the Microsoft Outlook Web Access (OWA) client, the Secure/Multipurpose Internet Mail Extension (S/MIME) control does not load after you download and install it from the OWA Options page. You experience the following symptoms:

 
If you click Options in the left pane, the E-mail Security area of the OWA Options page indicates that the S/MIME control is not installed. Only the Download button is available. You expect to see the Encrypt contents and attachments for outgoing messages check box and the Add a digital signature to outgoing messages check box.
When you start a new e-mail message, you experience the following symptoms:
If you click Options, the E-mail Security section does not appear. You expect to see the Encrypt message contents and attachments and Add a digital signature to this message check boxes.
The Encrypt message contents and attachments and Add a digital signature to this message buttons do not appear on the toolbar.
You cannot drag attachments to a Compose Message form.
This problem occurs even though the files are correctly installed in the %Windir%\Downloaded Program Files folder and the following registry subkey is set correctly:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Active Setup\Installed Components\{b0f84fec-95ad-4f3e-8fc0-6bc1bbadbf0d}
 
This problem occurs when you run the OWA client on a Microsoft Windows XP Service Pack 2 (SP2)-based computer. The Exchange Server 2003 OWA client uses a particular function call to determine whether the S/MIME control is installed. Windows XP SP2 restricts the components that are supported by this function call. Therefore, OWA cannot detect that the S/MIME component is installed.
 
Download the fix below:
Export DNS zones to new server
 

Below is the script to perform this task....

=======================>START

:: DNSdump

:: PURPOSE - Dumps local server's DNS service configuration and zone content. Once dumped, the content
::           can be imported on any other Windows 2000/2003 based DNS server [includes cross OS dumps]

:: DNSdump V2.0 is INCOMPATIBLE with the current public release

:: Supports Windows 2000/2003 members or DCs including Active Directory integrated zones. Application
:: partitions are supported

:: Requires Administrative credentials on local machine. If the DNS server is also a Domain Controller,
:: Domain Administrative credemtials are required in order to export or import Active Directory integrated
:: DNS zones

:: Active Directory integrated zones exported from the domain NC will be translated to the local domain
:: NC in the event of a cross domain export/import. Further behavioral details documented in syntax help

@echo off
setlocal ENABLEDELAYEDEXPANSION

:: Prepare the display
echo.

:: Define environment
set TOOLNAME=DNSdump
set KNOWNPATH=25,53,79,73,74,65,6d,52,6f,6f,74,25,5c,53,79,73,74,65,6d,33,\
set INSTALLROOT=%SystemRoot%\System32\DNS
set DUMP=%~f2
set STDOUT=nul
set STDERR=nul
set WORKING=0
set ERROR=
set domainDN=
set domainDNS=
set SUPPORTEDBUILDS=2195 3790

:: Check local server meets necessary requirements for successful operation

:: Derive operating system version and validate support
for /f "tokens=3 delims=.]" %%v in ('ver') do set BUILD=%%v
for %%s in (%SUPPORTEDBUILDS%) do (
 if not "%%s"=="%BUILD%" (
  if "!ERROR!"=="" set ERROR=1
 ) else (
  set ERROR=0
 )
)
if not "%ERROR%"=="0" (
 call :ERROR unsupported operating system version, build "%BUILD%"
 goto :END
)

:: Check for sufficient arguments
if "%2"=="" (
 call :ERROR insufficient arguments
 call :SYNTAX
 goto :END
)

:: Correct and/or report any errors in the dump directory argument
set DUMP=%DUMP:"=%
set TDUMP=%DUMP: =%
if not "%TDUMP%"=="%DUMP%" (
 call :ERROR dump path CANNOT contain spaces, "%DUMP%"
 goto :END
)

:: Locate critical executables, error and terminate if not found
for %%e in (net.exe findstr.exe ldifde.exe regedit.exe) do (
 set where="%%~$PATH:e"
 if "!where!"=="""" (
  call :ERROR critical executable, "%%e", could not be located 
  goto :END
 )
)
 
:: Determine if DNS service is installed on local machine
regedit /E:A "%TEMP%\DNS-Service.TMP" HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\DNS
if not exist "%TEMP%\DNS-Service.TMP" (
 call :ERROR DNS service does not appear to be installed on "%COMPUTERNAME%"
 goto :END
)

:: Check local credentials
net user "%username%" | findstr /i "Administrators" 1>%STDOUT% 2>%STDERR%
if errorlevel 1 (
 net user "%username%" | findstr /i /c:"Domain Admins" 1>%STDOUT% 2>%STDERR%
 if errorlevel 1 (
  call :ERROR security context is insufficient, administrative credentials required
  goto :END
 )
)

:: Determine if local machine is member or Domain Controller
regedit /E:A "%TEMP%\DCorMember.TMP" "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\ProductOptions"
if not exist "%TEMP%\DCorMember.TMP" (
 call :ERROR unable to determine machine configuration [DC or member]
 goto :END
)
for /f "tokens=2 delims==" %%t in ('type "%TEMP%\DCorMember.TMP" ^| findstr "ProductType"') do (
 if /i "%%t"==""LanmanNT"" (set TYPE=DC) else (set TYPE=MEMBER)
)

:: Get DNS domain name of local machine
if "%TYPE%"=="DC" (
 regedit /E:A "%TEMP%\NTDS-Service.TMP" HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Netlogon\Parameters
 if not exist "%TEMP%\NTDS-Service.TMP" (
  call :ERROR Directory Service configuration could not be determined
  goto :END
 )
 for /f "tokens=1* delims==" %%s in ('type "%TEMP%\NTDS-Service.TMP" ^| findstr "sysvol"') do (
  set SYSVOL=%%t
  set SYSVOL=!SYSVOL:\\=\!
  for /f "tokens=2 delims=>" %%d in ('dir !SYSVOL! /ad ^| findstr "JUNCTION"') do (
   set domainDNS=%%d
   set domainDNS=!domainDNS: =!
  )
 )
 if "!domainDNS!"=="" (
  call :ERROR Directory Service configuration could not be determined
  goto :END
 )
 call :DERIVEDN "!domainDNS!"
 set domainDN=!partDN!
)

:: Begin script body

:: Determine mode of operation
if /i "%1"=="IMPORT" (
 set MODE=IMPORT
)  else (
 if /i "%1"=="EXPORT" (
  set MODE=EXPORT
 ) else (
  call :ERROR invalid mode specified, "%1"
  call :SYNTAX
  goto :END
 )
)

:: React to derived mode and create/verify dump directory structure
if "%MODE%"=="EXPORT" (
 if exist "%DUMP%" (
  call :ERROR dump directory already exists, "%DUMP%"
  goto :END
 ) else (
  md "%DUMP%" 2>%STDERR%
  if errorlevel 1 (
   call :ERROR unable to create dump directory, "%DUMP%"
   goto :END
  )
  md "%DUMP%\InstallRoot" 2>%STDERR%
  if errorlevel 1 (
   call :ERROR unable to create directory, "%DUMP%\InstallRoot"
   goto :END
  )
  md "%DUMP%\Logs" 2>%STDERR%
  if errorlevel 1 (
   call :ERROR unable to create log directory, "%DUMP%\Logs"
   goto :END
  )
 )
) else (
 if not exist "%DUMP%" (
  call :ERROR specified dump directory NOT found, "%DUMP%"
  goto :END
 )
)

:: Define custom DNS service installation root if supplied
if not "%3"=="" (
 set INSTALLROOT=%~f3
 if not exist "%IN