系統準備工具 (Sysprep) 指令碼檔機碼

文章翻譯 文章翻譯
文章編號: 196667 - 檢視此文章適用的產品。
全部展開 | 全部摺疊

在此頁中

結論

當您使用 Microsoft 系統準備 (Sysprep) 工具時,精靈會在執行下一次工具會準備電腦,並將影像複製到電腦之後啟動電腦。您可以建立指令碼檔案,以自動化此程序。若要使用 Sysprep 指令檔,使用下列語法

<filename>sysprep.exe

其中 <filename>」 是指令碼檔案的名稱。

請注意指令碼檔案必須包含一個稱為 [NT4Preinstall] 的區段。

其他相關資訊

指令碼檔機碼

您可以使用下列機碼 Sysprep 指令碼檔案中:
Key name:    OemSkipEula
Values:      Yes | No
Description: This key disables the display of the End User License 
             Agreement (EULA) when the value is set to Yes. The default 
             value is No.

Key name:    ProductID 
Value:       xxx-xxxxxxx OR xxxxx-OEM-xxxxxx-xxxxx
Description: This key specifies whether the Product ID screen should be 
             displayed. The Product ID key is displayed by default.

Key name:    FullName
Value:       <string>
Description: This key specifies the user's name. If this key is not 
             specified or the string value is blank, the User Name And 
             Organization screen is displayed.

Key name:    OrgName
Value:       <string>
Description: This key specifies the user's organization or company name. 
             If this key is not specified or the string value is blank, 
             the User Name And Organization screen is displayed, unless 
             the FullName key is specified with a valid string value.

Key name:    ComputerName
Values:      <string> | "Auto"
Description: This key specifies the computer name. If this key is not 
             specified or the string value is blank, the Computer Name 
             screen is displayed. The string value must be a minimum of 1 
             non-white-space character and a maximum of 15 non-white-space
             characters.

             If this string value is set to "Auto," Setup automatically 
             generates a unique computer name based on a random number. 
             This provides a mechanism to install multiple computers with
             a unique computer name. 

Key name:    AdminPassword
Value:       <string>
Description: This key specifies the password for the administrator 
             account. If this key is not specified or the string value is 
             blank, the Administrator Password screen is displayed. The 
             string value must be a minimum of 1 non-white-space character
             and a maximum of 15 non-white-space characters. To specify a 
             blank or NULL password use "*".

Key name:    OEMBannerText 
Value:       <text string>
Description: This key specifies a string to be displayed in the upper-left
             corner of the screen. The text must contain the "Windows NT" 
             sub-string or it is ignored. You can specify multiple lines 
             by using the "*" character as a separator.

Key name:    OEMLogoBitmapFile
Values:      <file name> [, <resource id>]
Description: This key specifies a bitmap to be displayed in the upper-
             right corner of the screen. If this key has only one field, 
             it is assumed to be a bitmap (.bmp) file located in the 
             folder in which the System Preparation tool resides. If two 
             fields are specified, the first field is the name of a 
             dynamic-link library (DLL) and the second field is a decimal 
             number that represents the resource ID of the bitmap in the 
             DLL. The DLL should be located in the folder that contains 
             Sysprep.exe.

Key name:    OEMBackgroundBitmapFile
Values:      <file name> [,<resource id>]
Description: This key specifies a background bitmap to display. If this 
             key has only one field, it is assumed to be a bitmap (.bmp) 
             file located in the folder in which Sysprep.exe resides. If 
             two fields are specified, the first field is the name of a 
             dynamic-link library (DLL) and the second field is a decimal 
             number that represents the resource ID of the bitmap in the 
             DLL. The DLL should be located in the folder that contains 
             Sysprep.exe.

Key name:    OEMSkipWelcome
Values:      0 | 1
Description: If this key is set to 1, the Welcome page is skipped. If the 
             key is set to 0, the Welcome page is displayed.

Key name:    OEMNoWaitAfterGUIMode
Values:      0 | 1
Description: If this key is set to 1, the Finished page is not displayed 
             and the computer is automatically restarted when the wizard 
             is finished. If the key is set to 0, the Finished page is 
             displayed and the computer does not automatically restart.

Key name:    NoSidGen
Value:       Yes | No
Description: This key disables the Security Identification (SID) 
             modification code. Set this key to Yes to disable the SID 
             modification code. You might use this value if the computer 
             is to be preconfigured with system services and access (ACL) 
             permissions. This allows a system integrator or administrator
             to preconfigure a computer and set the computer name, 
             administrator password, and other settings at the final 
             location.

             NOTE: Do not use this key if you plan to duplicate the 
             system.
				

範例指令碼檔案

下列範例檔是 Windows NT 4.0 迷你安裝精靈指令碼的範例:
   [NT4Preinstall]
   OemSkipEula = Yes
   ProductID = 123-4567890
   FullName = "Sample Company User"
   OrgName = "Sample Company Inc."
   ComputerName = "auto"
   AdminPassword = "password"
				

Sysprep.exe 命令列參數

Sysprep 支援下列的命令列參數:
Switch:      <filename>
Description: Instructs the Windows NT 4.0 Mini-Setup wizard to use the 
             settings in the specified script file automatically. For 
             example, the following command specifies that the Mini-Setup 
             wizard should use the settings in the Nt4setup.inf file:

                sysprep nt4setup.inf

             NOTE: There is no dash preceding the script file name.

Switch:      -quiet
Description: Instructs Sysprep to run without displaying a warning dialog 
             box. For example, the following command specifies that only 
             the license information screen should be displayed:

                sysprep -quiet

             The warning message stating that the computer is going to be 
             prepared for disk imaging and automatically shut down is not 
             displayed, and the computer shuts down automatically.

             NOTE: The preceding dash is required.

Switch:      -reboot
Description: Instructs Sysprep to automatically restart the computer. For 
             example, the following command specifies that the computer is
             restarted automatically instead of being shut down after 
             Sysprep has finished:

                sysprep -reboot

             You should not use this switch if you are preparing the 
             computer for disk imaging. This switch may be useful if you 
             plan to automate a test process designed to run after Sysprep
             has finished.

             NOTE: The preceding dash is required.

Switch:      -defeat
Description: Instructs Sysprep to run on a computer that has retail 
             versions of Windows NT 4.0 Workstation or Windows NT 4.0 
             Server and Microsoft Office 97. Normally, Sysprep requires
             a Microsoft Select Volume CD-ROM or an OEM (Original 
             Equipment Manufacturer) CD-ROM installation to run. 
				

下列範例 Sysprep 指令會使用所有命令列參數:

重新 sysprep setupscript.inf 無訊息式-啟動-戰敗

?考

取得更多資訊有關 Sysprep 請檢閱 Sysprep.doc 檔隨附於 Sysprep 工具。

屬性

文章編號: 196667 - 上次校閱: 2002年9月9日 - 版次: 1.0
這篇文章中的資訊適用於:
  • Microsoft Windows NT Workstation 4.0 Developer Edition
  • Microsoft Windows NT Server 4.0 Standard Edition
關鍵字:?
kbmt kbinfo KB196667 KbMtzh
機器翻譯
重要:本文是以 Microsoft 機器翻譯軟體翻譯而成,而非使用人工翻譯而成。Microsoft 同時提供使用者人工翻譯及機器翻譯兩個版本的文章,讓使用者可以依其使用語言使用知識庫中的所有文章。但是,機器翻譯的文章可能不盡完美。這些文章中也可能出現拼字、語意或文法上的錯誤,就像外國人在使用本國語言時可能發生的錯誤。Microsoft 不為內容的翻譯錯誤或客戶對該內容的使用所產生的任何錯誤或損害負責。Microsoft也同時將不斷地就機器翻譯軟體進行更新。
按一下這裡查看此文章的英文版本:196667
Microsoft及(或)其供應商不就任何在本伺服器上發表的文字資料及其相關圖表資訊的恰當性作任何承諾。所有文字資料及其相關圖表均以「現狀」供應,不負任何擔保責任。Microsoft及(或)其供應商謹此聲明,不負任何對與此資訊有關之擔保責任,包括關於適售性、適用於某一特定用途、權利或不侵權的明示或默示擔保責任。Microsoft及(或)其供應商無論如何不對因或與使用本伺服器上資訊或與資訊的實行有關而引起的契約、過失或其他侵權行為之訴訟中的特別的、間接的、衍生性的損害或任何因使用而喪失所導致的之損害、資料或利潤負任何責任。

提供意見

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com