Skip navigation

JSI Tip 7506. Windows 2000 Sysprep.exe does not use the OrgName in the Sysprep.inf file to randomly generate a computer name?

Starting with SP3, the Windows 2000 Sysprep.exe uses the first 8 characters of the following, in order of preference, to generate the new computer name:

1. RegisteredOrganization.

2. RegisteredOwner.

3. OrgName from the SysPrep.inf file.

4. FullName from the SysPrep.inf file.

To force Sysprep.exe to use a value from the SysPrep.inf file:

1. Copy /Paste the following to a Registered.bat file:

@echo off
regedit /a %TEMP%\Registered.reg "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion"
@echo REGEDIT4>Registered.reg
@echo.>>Registered.reg
@echo \[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\]>>Registered.reg
findstr /I /L /C:"RegisteredOrganization" %TEMP%\Registered.reg>>Registered.reg
findstr /I /L /C:"RegisteredOwner" %TEMP%\Registered.reg>>Registered.reg
@echo REGEDIT4>%TEMP%\Registered.reg
@echo.>>%TEMP%\Registered.reg
@echo \[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\]>>%TEMP%\Registered.reg
@echo "RegisteredOrganization"="">>%TEMP%\Registered.reg
@echo "RegisteredOwner"="">>%TEMP%\Registered.reg
@echo.>>%TEMP%\Registered.reg
regedit /s %TEMP%\Registered.reg
del /q %TEMP%\Registered.reg
2. Open a CMD prompt and switch ( CD) to a folder where you want a backup copy of the RegisteredOrganization and RegisteredOwner saved, as Registered.reg.

2. Run the Registered.bat file from the CMD prompt.

3. Run SysPrep.exe.

4. Restore the RegisteredOrganization and RegisteredOwner values by running regedit /s registered.reg from the CMD prompt.



Hide comments

Comments

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

Plain text

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