Subscribe to Windows IT Pro
August 01, 1997 12:00 AM

12 Steps to Cloning Windows NT Systems with SYSDIFF.EXE

Windows IT Pro
InstantDoc ID #1
Rating: (0)

To use this alternative procedure, perform steps 1 through 11 to create the difference file. Then you must prepare the target system for file installation. Finally, you create the .INF file by selecting the NT Start menu, Run, and then entering the following:

D:\Bin\SYSDIFF.EXE /inf d:\bin\after.img d:\bin2

D:\bin\after.img is the path and name of the difference file, and d:\bin2 is the location for the .INF file and changes to the system.

The .INF file is given the same name as the difference file, except that the .INF file has an INF extension (in this case, AFTER.INF). Screen 5 shows the contents of the .INF file; you can display the file in Notepad or in any other text editor or word processor.

With the setup information you supply to SETUPMGR.EXE and the $OEM$ directory you created with the /INF option and SYSDIFF.EXE, you have the necessary files to perform a complete installation with NT, services, applications, Registry settings, and all preferences set. After you boot the target system and connect it to the server, start the NT installation. If you named the answer file UNATTENDED.TXT in D:\BIN, the command line you use is

WINNT /U:D:\BIN\UNATTEND.TXT

Notice you do not need to specify the $OEM$ directory or add anything to get the system to install the applications. Installation occurs as a function of the installation, with no added input on your part. Once the installation is complete, NT and all your applications are installed on the target system.

Streamlining the SYSDIFF Process
The SYSDIFF.INF file, which comes with SYSDIFF.EXE on the NT Server 4.0 CD-ROM, controls the SYSDIFF process. By editing the SYSDIFF.INF file, you can make the cloning process smoother, faster, and more space-efficient. The SYSDIFF.INF file is an inclusion/exclusion file that determines what SYSDIFF.EXE will or won't review when it creates the snapshot and difference files. The SYSDIFF.INF file on the CD-ROM has nine sections:

  • [Version]
  • [ExcludeDrives]
  • [ExcludeDirectoryTrees]
  • [ExcludeSingleDirectories]
  • [ExcludeFiles]
  • [IncludeFilesInDir]
  • [ExcludeRegistryKeys]
  • [ExcludeRegistryTrees]
  • [ExcludeRegistryValues]

Entries in the SYSDIFF.INF file (as long as the file is in the same directory as SYSDIFF.EXE) direct the cloning process. For example, suppose you add drive E to the [ExcludeDrives] section. Then SYSDIFF.EXE will not look at that drive during the creation of the snapshot or difference file. Excluding a drive that contains no useful information can save a great deal of time in the cloning process. However, you need to be very careful about removing default entries in the SYSDIFF.INF file. By doing so, you can make the cloning process unsuccessful.

Overcoming Side Effects
Using SYSDIFF.EXE and the difference file to install applications has one side-effect: Files transferred to the target system inherit the date of the installation instead of retaining their original date when they are written to the hard drive, as Screen 6 shows. Thus, the contents of the difference file (Registry changes, .INI file changes, and program and data files new since the first snapshot) are all re-dated when they're copied to the target system.

If you want to retain the files' original dates, you can split the Registry and .INI changes from the files, apply the Registry and .INI changes, and then copy the files separately instead of using the difference file to install the software. Create the AFTER.INF file as explained in the previous section. Then you can change Registry and .INI files on the target system by adding the .INF file to the list of files to use at installation. You do this task through SETUPMGR.EXE. Start SETUPMGR.EXE, and choose Advanced Options. Then select the Boot Files tab. Add the file path and name, as in Screen 7. When you use the answer file to install NT, the Registry and .INI file changes occur automatically.

After you make the Registry and .INI changes, your final step is to copy the directories and files to complete the installation. The .INF file-creation procedure conveniently copies all files in the difference file to subdirectories under the $OEM$ subdirectory (which you see in Screen 8). When you copy the files to this subdirectory, their dates change to the current date. Using files in the $OEM$ subdirectory can compromise your security if you date-stamp your files.

Although you have copied the files to the $OEM$ subdirectory, you don't need to include them in the installation process if you want to preserve the files' original dates and times. Instead of copying and using the files under $OEM$, install NT with an answer file and then copy the originals with XCOPY.EXE to retain file dates and times.

Repair the Registry
In addition to cloning, you can use the .INF file to correct a Registry problem with an application (e.g., corrupted files). Ordinarily, you need to reinstall the application and then make the necessary changes to menus, toolbars, and preferences. However, having a list of every change the application installation and modification processes made to the Registry and .INI files would save you a tremendous amount of time in restoring your application.

If you create a difference file after you install an application, you have this list of changes. To repair the Registry, simply create a loadable .INF file from the difference file as explained earlier. You can then load the .INF file back into the system through SETUPMGR.EXE. But instead of doing another installation over the current NT installation, choose to do an update. Include the .INF file by selecting the Advanced Options and Boot Files options in SETUPMGR.EXE. The Registry will then be updated with the .INF file information.

Clone Away!
SYSDIFF.EXE is a versatile tool. You can use it to install NT and all the software you need on multiple systems with the difference file or .INF file method. And, the .INF file created with SYSDIFF.EXE lets you repair Registry files. Let me know how SYSDIFF.EXE's cloning power works for you

Related Content:

ARTICLE TOOLS

Comments
  • Wernher Eksteen
    10 years ago
    Apr 23, 2002

    Hi there, I saw your your 12 Steps on Cloning an NT installation. I have a few questions:

    To start from the beginning, I have created a multiboot cd that boots between windows professional, windows server and windows advanced server and integrated SP 2 to each and used the setupmgr to create an unattended.txt file that I renamed to winnt.sif and copied onto my stiffy to use when I choose to boot windows 2000 server. So now I have a unattended setup as well, and can change the criteria such as names and ip addresses etc for different installations.

    I want to know if it can be possible to use such a cd, and create an &oem% directory off it and have setup read from that as the distributed directory instead of a network share if I understand correctly. It would be great if that's possible, if so, what do I do.

    I am a bit confused with your explanation on this 12 steps to cloning a winnt installation, I wonder what you mean with master system and server. The way I understand this is that you say I have to have 2 seperate computers, one with a preinstalled windows system on it that will be snapshotted and diffed I think the master system, and the other the server that will have shares to the sysdiff.exe utility that will snapshot the master system. I am not sure if I understand you correct here, maybe I'm to stupid, but can you come down to earth and explain in more detail as to what on earth exactly you mean.

    Maybe I'm not understanding you correct. Maybe I'm havin the entire wrong idea, but my thinking is to have applications installed during the windows installation process without my interaction. Is this what you have explained, or am I on the wrong track. If I'm right, then can I do this with the cd I explained above by using that &oem& directory with that cmdlines.txt or not. In other words, can I use this way that you try to describe with sysdiff to begin a clean install from scratch, and that I will have certain applications installed as part of the windows installation process ?

    That's it, I hope it made sence. Hope to hear form you soon.

  • Marcin Czabanski
    13 years ago
    Aug 13, 1999

    I found Clayton Johnson’s August article, “12 Steps to Cloning Windows NT Systems with SYSDIFF.EXE,” very useful. The article helped us set up about 200 NT workstations in our new library at Wayne State University. Unfortunately, I found a small but crucial syntax error. The error appears in the syntax on page 158, step 12:



    sysdiff /m /apply X:\\after.img



    With this syntax, the procedure does not work. However, it does work as:



    sysdiff /apply /m X:\\after.img



    --Marcin Czabanski




    Thank you for the correction. We apologize for any inconvenience this error may have caused.

    --Karen Forster

You must log on before posting a comment.

Are you a new visitor? Register Here

advertisement

advertisement

Windows is a trademark of the Microsoft group of companies. Windows IT Pro is used by Penton Media Inc. under license from owner.