MSFN Forum: DISM Improvements in Windows 8 - MSFN Forum

Jump to content


  • 4 Pages +
  • 1
  • 2
  • 3
  • Last »
  • You cannot start a new topic
  • You cannot reply to this topic

DISM Improvements in Windows 8

#1 User is offline   MagicAndre1981 

  • after Windows 7 GA still Vista lover :)
  • Group: Patrons
  • Posts: 4,976
  • Joined: 28-August 05
  • OS:Vista Ultimate x86
  • Country: Country Flag

Posted 08 October 2011 - 06:59 AM

I only want to post that DISM from Windows 8 adds some new cool features. You can now use VHD images and not only WIMs:

/Get-MountedImageInfo   - Displays information about mounted WIM and VHD images.
  /Get-ImageInfo          - Displays information about images in a WIM or VHD file.
  /Commit-Image           - Saves changes to a mounted WIM or VHD image.
  /Unmount-Image          - Unmounts a mounted WIM or VHD image.
  /Mount-Image            - Mounts an image from a WIM or VHD file.
  /Remount-Image          - Recovers an orphaned image mount directory.
  /Cleanup-Mountpoints    - Deletes resources associated with mounted
                            images that are corrupt.



Example:

DISM /Mount-Image /ImageFile:"D:\VHD\6.1.7601.17514.amd64fre.win7sp1_rtm.101119-1850.Ultimate.de-DE.vhd" /Index:1 /MountDir:"D:\VHD\Mount"

DISM /Image:D:\VHD\Mount /Add-Package /PackagePath:"D:\Windows6.1-KB2545698-x64.msu"

DISM /Unmount-Image /MountDir:D:\VHD\Mount /Commit



There also also new commands which replaces the old ImageX completely:

/List-Image             - Displays a list of the files and folders within a 
                            specified image.
  /Delete-Image           - Deletes the specified volume image from a .wim file 
                            with multiple volume images.
  /Split-Image            - Splits an existing .wim file into multiple read-only 
                            split .wim (SWM) files.
  /Export-Image           - Exports a copy of the specified image to another file.
  /Append-Image           - Adds an additional image to a .wim file.
  /Capture-Image          - Captures an image of a drive into a new .wim file. 
                            Captured directories include all subfolders and data.



And a really cool thing is the new /Optimize Parameter when mounting WIMs:

Quote

Use /Optimize to reduce initial mount time and improve the speed of many servicing commands.


:thumbup


#2 User is offline   TheWalrus 

  • N.W.O.
  • PipPipPipPipPip
  • Group: Members
  • Posts: 911
  • Joined: 11-August 08
  • OS:Windows 7 x64
  • Country: Country Flag

Posted 10 October 2011 - 03:34 AM

Can we use DISM from W8 in W7?

#3 User is offline   MagicAndre1981 

  • after Windows 7 GA still Vista lover :)
  • Group: Patrons
  • Posts: 4,976
  • Joined: 28-August 05
  • OS:Vista Ultimate x86
  • Country: Country Flag

Posted 10 October 2011 - 06:21 AM

yes. I installed the Assessment and Deployment Kit (ADK) which replaces the WAIK

Attached File  Setup_ADK_07_01.png (84.47K)
Number of downloads: 249

on my Windows 7 Sp1 and tested it with a VHD of Win7 Sp1 which I use for native booting and it works fine.

Currently the ADK is only available for MSDN subscribers.

#4 User is offline   Tripredacus 

  • K-Mart-ian Legend
  • Group: Super Moderator
  • Posts: 8,682
  • Joined: 28-April 06
  • OS:Server 2012
  • Country: Country Flag

Posted 10 October 2011 - 08:15 AM

Its not surprising that it can service VHD images, since that is the image type that Windows Backup makes.

#5 User is offline   MagicAndre1981 

  • after Windows 7 GA still Vista lover :)
  • Group: Patrons
  • Posts: 4,976
  • Joined: 28-August 05
  • OS:Vista Ultimate x86
  • Country: Country Flag

Posted 10 October 2011 - 08:53 AM

this has nothing to do with backup. DISM is used to service images. [OTAnd in Windows 8 "Windows backup" is obsolete and will no longer be updated. You must use the new "File History" feature in combination with "Reset/Refresh" the PC.[/OT]

The only confusing part is the Index in the command. Can VHDs have more images or only 1? If I don't use Index the mount fails.

#6 User is offline   jaclaz 

  • The Finder
  • Group: Developers
  • Posts: 11,447
  • Joined: 23-July 04
  • OS:none specified
  • Country: Country Flag

Posted 10 October 2011 - 12:59 PM

View PostMagicAndre1981, on 10 October 2011 - 08:53 AM, said:

The only confusing part is the Index in the command. Can VHDs have more images or only 1? If I don't use Index the mount fails.

A .vhd (the "normal" "static type) is nothing but a RAW HD image with a single ("Connectix" ;)) sector appended.
There is NO index of any kind in them. (unless the format has been changed in Windows 8 :ph34r: )

jaclaz

#7 User is offline   MagicAndre1981 

  • after Windows 7 GA still Vista lover :)
  • Group: Patrons
  • Posts: 4,976
  • Joined: 28-August 05
  • OS:Vista Ultimate x86
  • Country: Country Flag

Posted 10 October 2011 - 01:29 PM

but without the Index I can't mount the VHD. Ok, I'll report this with the feedback tool.

What I know is that MS created a new VHD format in Windows 8, called VHDX which can support up to 16TB.

#8 User is offline   cluberti 

  • Gustatus similis pullus
  • Group: Supervisor
  • Posts: 11,208
  • Joined: 09-September 01
  • OS:Windows RT
  • Country: Country Flag

Posted 10 October 2011 - 03:28 PM

Given that boot to VHD is a native feature of the OS, Microsoft's deployment tools will support building said VHDs (MDT 2012 and ConfigMgr 2012), and VDI environments on Hyper-V will boot and use VHDs, it's not surprising the next version of the build tools (now the ADK, as Andre mentioned) natively support VHD.

#9 User is offline   TheWalrus 

  • N.W.O.
  • PipPipPipPipPip
  • Group: Members
  • Posts: 911
  • Joined: 11-August 08
  • OS:Windows 7 x64
  • Country: Country Flag

Posted 15 October 2011 - 01:43 AM

View PostMagicAndre1981, on 10 October 2011 - 08:53 AM, said:

[OTAnd in Windows 8 "Windows backup" is obsolete and will no longer be updated. You must use the new "File History" feature in combination with "Reset/Refresh" the PC.[/OT]

Ugh. This is the part of Microsoft I strongly dislike. For some reason, they feel urge to confuse people. What's wrong with Windows Backup? It's like if the word "car" was renamed to "personal carrier for various purposes" or something.


Can't think of better example of "if it works, don't fix it" :P



#10 User is offline   jaclaz 

  • The Finder
  • Group: Developers
  • Posts: 11,447
  • Joined: 23-July 04
  • OS:none specified
  • Country: Country Flag

Posted 15 October 2011 - 02:46 AM

View PostTheWalrus, on 15 October 2011 - 01:43 AM, said:

"personal carrier for various purposes" or something.

Naaah :blink: , that was last year, the new name is "self-propelled carriage 2.0". ;) (and you need to install .Net 6.23 :w00t: or later to tell the gas station pump which fuel you want :whistle: )

jaclaz

#11 User is offline   MagicAndre1981 

  • after Windows 7 GA still Vista lover :)
  • Group: Patrons
  • Posts: 4,976
  • Joined: 28-August 05
  • OS:Vista Ultimate x86
  • Country: Country Flag

Posted 15 October 2011 - 06:58 AM

View PostTheWalrus, on 15 October 2011 - 01:43 AM, said:

Ugh. This is the part of Microsoft I strongly dislike. For some reason, they feel urge to confuse people. What's wrong with Windows Backup? It's like if the word "car" was renamed to "personal carrier for various purposes" or something.


MS write that the feature was not actively used:

Quote

Windows 7 Backup and Restore Deprecated
Description
While there is no behavioral change to Backup and Restore, this function is being deprecated and will not be updated. It was rarely used and its functionality has been replaced by the new File History feature. It will ship in Windows Developer Preview and enthusiasts who upgraded from Windows 7 to Windows Developer Preview or depend on Backup and Restore or disk image backup will be still able to use it. However, all access points to Backup and Restore, with the exception of the Control Panel, have been removed

We do not recommend using both features at the same time. File History checks if Backup schedule exists and is active and if it finds one, it will not let users to turn it on.


#12 User is offline   jaclaz 

  • The Finder
  • Group: Developers
  • Posts: 11,447
  • Joined: 23-July 04
  • OS:none specified
  • Country: Country Flag

Posted 15 October 2011 - 07:46 AM

View PostMagicAndre1981, on 15 October 2011 - 06:58 AM, said:

MS write that the feature was not actively used:

Personally I got "burned" by "windows backup" many, many years ago, in DOS times, and since then I image disks (and backup files).
No wonder very few people uses it, the ones who are "in the works" mostly don't trust it, and the "newbies" don't even know about it (or cannot possibly understand how it works).
And it seems like even Windows 7 was not "problem free" I like this quote:
http://www.windows7n...ackup-problems/

Quote

Depending on which way the wind is blowing and whether or not there’s an R in the month, Windows might store these on your Windows 7 disk or partition, it may create a System Volume where it stores them or it may put them on another disk or partition that you’re using for something else.


:lol:

jaclaz

#13 User is offline   Tripredacus 

  • K-Mart-ian Legend
  • Group: Super Moderator
  • Posts: 8,682
  • Joined: 28-April 06
  • OS:Server 2012
  • Country: Country Flag

Posted 17 October 2011 - 08:32 AM

View PostMagicAndre1981, on 15 October 2011 - 06:58 AM, said:

MS write that the feature was not actively used:


Its unfortunate. Any time I've told a client they can use Backup to another drive and restore files after running recovery, they never end up using it.

#14 User is offline   MagicAndre1981 

  • after Windows 7 GA still Vista lover :)
  • Group: Patrons
  • Posts: 4,976
  • Joined: 28-August 05
  • OS:Vista Ultimate x86
  • Country: Country Flag

Posted 22 February 2012 - 11:17 AM

DISM includes a new option in Windows 8. The /Remove Parameter in the /Disable-Feature command.

The syntax is the following:

DISM.exe /Online /Disable-Feature /Featurename:<name> /Remove


If you use the Disable-Feature in Vista and Windows 7, the files from the disabled feature are still stored in the WinSxS folder and you get NO additional free HDD space when disabling a feature.

The /Remove-Flag changes this in Windows 8. NOW ALL THE FILES ARE REMOVED FROM THE WINSXS Folder!

Example:

Run DISM.exe /Online /English /Get-Features /Format:Table to see which featues you have and you see something like this:

Quote

----------------------------------------------------- | -----------------------------
Feature Name | State
----------------------------------------------------- | -----------------------------
SimpleTCP | Enabled


If you now run DISM.exe /Online /Disable-Feature /Featurename:SimpleTCP /Remove the SimpleTCP feature is disabled and the files associated with the SimpleTCP Feature are removed. If you run /Get-Features again you see this:

Quote

----------------------------------------------------- | -----------------------------
Feature Name | State
----------------------------------------------------- | -----------------------------
SimpleTCP | Disabled with Payload Removed


Payload Removed = DLLs removed from WinSxS. if you now want to enable the features, the "Turn Windows Features on or off" asks to download the missing files:

Attached File  WindowsUpdate_Windows8.png (48.06K)
Number of downloads: 75

So this is the safe way to disable features and getting more free HDD space :thumbup :thumbup :thumbup :thumbup

#15 User is offline   Tripredacus 

  • K-Mart-ian Legend
  • Group: Super Moderator
  • Posts: 8,682
  • Joined: 28-April 06
  • OS:Server 2012
  • Country: Country Flag

Posted 23 February 2012 - 08:56 AM

View PostMagicAndre1981, on 22 February 2012 - 11:17 AM, said:

So this is the safe way to disable features and getting more free HDD space :thumbup :thumbup :thumbup :thumbup


Great, maybe we can use this to disable the Metro UI. :crazy:

#16 User is offline   MagicAndre1981 

  • after Windows 7 GA still Vista lover :)
  • Group: Patrons
  • Posts: 4,976
  • Joined: 28-August 05
  • OS:Vista Ultimate x86
  • Country: Country Flag

Posted 23 February 2012 - 09:36 AM

no, because Metro-Shell is loaded by the Explorer.exe. I'll try to block the Metro DLL loading in the beta/Consumer Preview.

#17 User is offline   MagicAndre1981 

  • after Windows 7 GA still Vista lover :)
  • Group: Patrons
  • Posts: 4,976
  • Joined: 28-August 05
  • OS:Vista Ultimate x86
  • Country: Country Flag

Posted 04 April 2012 - 10:42 AM

With DISM you can also add and remove Metro-Apps from running Windows (/Online) or an Image:

DISM /Online /Add-ProvisionedAppxPackage /PackagePath:C:\App1.appx /SkipLicense



You can also get a List aof install apps:

DISM.exe  /Online /Get-ProvisionedAppxPackages



and remove them:

DISM.exe /Online /Remove-ProvisionedAppxPackage /PackageName:microsoft.app1_1.0.0.0_neutral_en-us_ac4zc6fex2zjp



More Details here:

How to Add and Remove Apps
http://technet.micro...y/hh852635.aspx

#18 User is online   maxXPsoft 

  • MSFN Master
  • Group: Developers
  • Posts: 2,748
  • Joined: 14-November 03
  • OS:Windows 7 x64
  • Country: Country Flag

Posted 05 April 2012 - 07:23 PM

View PostMagicAndre1981, on 22 February 2012 - 11:17 AM, said:

DISM includes a new option in Windows 8. The /Remove Parameter in the /Disable-Feature command.

So this is the safe way to disable features and getting more free HDD space :thumbup :thumbup :thumbup :thumbup
without all the headache of these remove programs, excellent post MagicAndre.
Now makes m want to see if the new dism will also remove from a 7 system source or has anyone tested that?

Although I dislike the Metroui also and there is a reg tweak to disable

This post has been edited by maxXPsoft: 05 April 2012 - 07:23 PM


#19 User is offline   CoffeeFiend 

  • Coffee Aficionado
  • Group: Super Moderator
  • Posts: 5,399
  • Joined: 14-July 04
  • OS:Windows 7 x64
  • Country: Country Flag

Posted 05 April 2012 - 09:59 PM

View Postjaclaz, on 15 October 2011 - 07:46 AM, said:

Personally I got "burned" by "windows backup" many, many years ago, in DOS times

+1 to that. Since then I've never really trusted any backup solution MS provided and it's very much paid off. I've used Ghost (in its DOS days), then Acronis TrueImage. For servers it's Backup Exec and Veeam. It all just works and it has proven itself repeatedly.

View PostTripredacus, on 23 February 2012 - 08:56 AM, said:

Great, maybe we can use this to disable the Metro UI

One can dream. Being able to disable Metro would be Win8's best feature, by a LONG shot. That's saying something.

View PostmaxXPsoft, on 05 April 2012 - 07:23 PM, said:

Although I dislike the Metroui also and there is a reg tweak to disable

That has stopped working with the customer beta. They couldn't care less if nobody wants of it, they'll force you to use it in any way possible. There are ways to mostly avoid it though, like classic shell. Or staying with Win7 like I'll do.

#20 User is offline   cdob 

  • Friend of MSFN
  • PipPipPipPipPip
  • Group: Members
  • Posts: 876
  • Joined: 29-September 05

Posted 06 April 2012 - 02:40 AM

Dism can capture and apply images

http://technet.micro...y/hh825258.aspx

Quote

Dism /Capture-Image /ImageFile:install.wim /CaptureDir:D:\ /Name:Drive-D
Dism /apply-image /imagefile:install.wim /index:1 /ApplyDir:D:\


Usage examples:
http://technet.micro...y/hh825072.aspx
http://technet.micro...y/hh824910.aspx
http://social.techne...ep-by-step.aspx


Install Windows 8 CP to USB using native tools:
Boot from Windows 8 DVD or another USB drive.
Press shift F10 to open command line
Prepare USB drive f:\ with diskpart, compare above examples.
Next Run
cd \
x:\>DISM.exe /Apply-Image /ImageFile:d:\sources\install.wim /Index:1 /ApplyDir:f:\
x:\>bcdboot.exe f:\windows /s f:
Adjust drives d: and f: to local used letters.

Share this topic:


  • 4 Pages +
  • 1
  • 2
  • 3
  • Last »
  • You cannot start a new topic
  • You cannot reply to this topic

3 User(s) are reading this topic
0 members, 3 guests, 0 anonymous users



All trademarks mentioned on this page are the property of their respective owners
Copyright © 2001 - 2013 msfn.org
Privacy Policy