使用 DISM 将 Windows 映像更改为较高版本Change the Windows Image to a Higher Edition Using DISM

你可以使用 Windows® edition 服务命令将一个 Windows 版本更改为更高版本的 Windows。You can use the Windows® edition-servicing commands to change one edition of Windows to a higher edition of Windows. 每个潜在目标版本的版本包都暂存在 Windows 映像中。The edition packages for each potential target edition are staged in the Windows image. 这称为版本系列映像。This is referred to as an edition-family image. 您可以使用命令行选项列出潜在的目标版本。You can use the command-line options to list potential target editions. 由于目标版本是暂存的,你可以为单个映像服务,更新将相应地应用于映像中的每个版本。Because the target editions are staged, you can service a single image, and the updates will be applied appropriately to each edition in the image.

需要产品密钥才能更改 Windows 版本。You need a product key to change the Windows edition online. 脱机更改不需要产品密钥。Offline changes do not require a product key. 如果使用脱机服务将图像更改为较高版本,则可以使用下列方法之一添加产品密钥:If you change the image to a higher edition using offline servicing, you can add the product key by using one of the following methods:

  • 在 (OOBE) 的全新体验中输入产品密钥。Enter the product key during the out-of-box experience (OOBE).

  • 使用无人参与的答案文件在 specialize 配置阶段中输入产品密钥。Use an unattended answer file to enter the product key during the specialize configuration pass.

  • 脱机设置版本后,使用部署映像服务和管理 (DISM) 和 Windows 版本服务命令行选项 /Set-ProductKeyUse Deployment Image Servicing and Management (DISM) and the Windows edition-servicing command-line option /Set-ProductKey after you set the edition offline.

有关产品密钥的详细信息,请参阅 使用产品密钥和激活For more information about product keys, see Work with Product Keys and Activation.

查找并更改 Windows 的当前版本Find and Change Current Edition of Windows

你可以通过在已装载的映像上装载映像并运行 DISM 命令来查找当前设置为的 Windows 版本。You can find the edition of Windows your image is currently set to by mounting the image and running DISM commands on the mounted image.

查找当前版本To find the current edition

  1. 单击 开始,然后键入 deploymentClick Start, and type deployment. 右键单击 部署和映像工具环境,然后选择 以管理员身份运行Right-click Deployment and Imaging Tools Environment and then select Run as administrator.

  2. 在命令提示符下,键入以下命令,以检索要修改的映像的名称或索引号。At the command prompt, type the following command to retrieve the name or index number for the image that you want to modify.

    Dism /Get-ImageInfo /ImageFile:C:\test\images
    
  3. 键入以下命令以装载脱机 Windows 映像。Type the following command to mount the offline Windows image.

    Dism /Mount-Image /ImageFile:C:\test\images /Index:1 /MountDir:C:\test\offline
    

    指定图像文件的大多数操作都需要索引或名称值。An index or name value is required for most operations that specify an image file.

  4. 键入以下命令以查找您的映像当前设置为的 Windows 版本。Type the following command to find the edition of Windows your image is currently set to.

    Dism /Image:C:\test\offline /Get-CurrentEdition
    

    请注意,您的映像当前设置为的 Windows 版本。Note which edition of Windows your image is currently set to. 如果图像已更改为较高版本,则不应再次更改。If the image has already been changed to a higher edition you should not change it again. 使用最低版本作为起点。Use the lowest edition as a starting point.

  5. 卸载映像,或继续执行下一个过程。Unmount the image or continue with the next procedure. 若要卸载映像,请键入以下命令。To unmount your image, type the following command.

    Dism /Unmount-Image /MountDir:C:\test\offline /Commit
    

更改为较高版本的 WindowsTo change to a higher edition of Windows

  1. 键入以下命令,以装载脱机 Windows 映像 ((如果尚未将其装入) 中)。Type the following command to mount the offline Windows image (if it is not already mounted).

    Dism /Mount-Image /ImageFile:C:\test\images /Name:<Image_name> /MountDir:C:\test\offline
    
  2. 键入以下命令,查找可以将映像更改为的 Windows 版本。Type the following command to find the editions of Windows that you can change your image to.

    Dism /Image:C:\test\offline /Get-TargetEditions
    

    请注意要更改为的版本的版本 ID。Note the edition-ID for the edition you want to change to.

    注意Note
    你无法将 Windows 映像设置为更低的版本。You cannot set a Windows image to a lower edition. 运行 /Get-TargetEditions 选项时不会显示最低版本。The lowest edition will not appear when you run the /Get-TargetEditions option. 不应对已更改为较高版本的映像使用该过程。You should not use this procedure on an image that has already been changed to a higher edition.

  3. 键入以下命令,指定要将 Windows 映像更改为较高版本的版本 ID。Type the following command specifying the edition-ID to change the Windows image to a higher edition.

    Dism /Image:C:\test\offline /Set-Edition:Professional
    
  4. 键入以下命令以卸载映像并提交更改。Type the following command to unmount the image and commit your changes.

    Dism /Unmount-Image /MountDir:C:\test\offline /Commit
    

相关主题Related topics

了解服务策略Understanding Servicing Strategies

DISM Windows Edition-Servicing Command-Line 选项DISM Windows Edition-Servicing Command-Line Options

DISM - Windows 的部署映像服务和管理技术参考DISM - Deployment Image Servicing and Management Technical Reference for Windows