Jump to content

Welcome to MSFN Forum
Register now to gain access to all of our features. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, post status updates, manage your profile and so much more. This message will be removed once you have signed in.
Login to Account Create an Account



Photo

DISM Improvements in Windows 8


  • Please log in to reply
98 replies to this topic

#1
MagicAndre1981

MagicAndre1981

    after Windows 7 GA still Vista lover :)

  • Patrons
  • 6,128 posts
  • Joined 28-August 05
  • OS:Vista Ultimate x86
  • Country: Country Flag

Donator

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:

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


:thumbup
Posted Image


How to remove advertisement from MSFN

#2
Octopuss

Octopuss

    I am the walrus

  • Member
  • PipPipPipPipPipPip
  • 1,127 posts
  • Joined 31-January 07
  • OS:Windows 7 x64
  • Country: Country Flag

Donator

Can we use DISM from W8 in W7?

#3
MagicAndre1981

MagicAndre1981

    after Windows 7 GA still Vista lover :)

  • Patrons
  • 6,128 posts
  • Joined 28-August 05
  • OS:Vista Ultimate x86
  • Country: Country Flag

Donator

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

Attached File  Setup_ADK_07_01.png   84.47KB   259 downloads

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.
Posted Image

#4
Tripredacus

Tripredacus

    K-Mart-ian Legend

  • Super Moderator
  • 9,964 posts
  • Joined 28-April 06
  • OS:Server 2012
  • Country: Country Flag

Donator

Its not surprising that it can service VHD images, since that is the image type that Windows Backup makes.
MSFN RULES | GimageX HTA for PE 3-5 | lol probloms
tpxmsfn1_zps393339c1.jpg

#5
MagicAndre1981

MagicAndre1981

    after Windows 7 GA still Vista lover :)

  • Patrons
  • 6,128 posts
  • Joined 28-August 05
  • OS:Vista Ultimate x86
  • Country: Country Flag

Donator

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.
Posted Image

#6
jaclaz

jaclaz

    The Finder

  • Developer
  • 14,669 posts
  • Joined 23-July 04
  • OS:none specified
  • Country: Country Flag

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
MagicAndre1981

MagicAndre1981

    after Windows 7 GA still Vista lover :)

  • Patrons
  • 6,128 posts
  • Joined 28-August 05
  • OS:Vista Ultimate x86
  • Country: Country Flag

Donator

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.
Posted Image

#8
cluberti

cluberti

    Gustatus similis pullus

  • Supervisor
  • 11,252 posts
  • Joined 09-September 01
  • OS:Windows 8.1 x64
  • Country: Country Flag
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.
MCTS Windows Internals, MCITP Server 2008 EA, MCTS MDT/BDD, MCSE/MCSA Server 2003, Server 2012, Windows 8
--------------------
Please read the rules before posting!
Please consider donating to MSFN to keep it up and running!

#9
Octopuss

Octopuss

    I am the walrus

  • Member
  • PipPipPipPipPipPip
  • 1,127 posts
  • Joined 31-January 07
  • OS:Windows 7 x64
  • Country: Country Flag

Donator

[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
jaclaz

jaclaz

    The Finder

  • Developer
  • 14,669 posts
  • Joined 23-July 04
  • OS:none specified
  • Country: Country Flag

"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
MagicAndre1981

MagicAndre1981

    after Windows 7 GA still Vista lover :)

  • Patrons
  • 6,128 posts
  • Joined 28-August 05
  • OS:Vista Ultimate x86
  • Country: Country Flag

Donator

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:

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.


Posted Image

#12
jaclaz

jaclaz

    The Finder

  • Developer
  • 14,669 posts
  • Joined 23-July 04
  • OS:none specified
  • Country: Country Flag

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/

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
Tripredacus

Tripredacus

    K-Mart-ian Legend

  • Super Moderator
  • 9,964 posts
  • Joined 28-April 06
  • OS:Server 2012
  • Country: Country Flag

Donator

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.
MSFN RULES | GimageX HTA for PE 3-5 | lol probloms
tpxmsfn1_zps393339c1.jpg

#14
MagicAndre1981

MagicAndre1981

    after Windows 7 GA still Vista lover :)

  • Patrons
  • 6,128 posts
  • Joined 28-August 05
  • OS:Vista Ultimate x86
  • Country: Country Flag

Donator

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:

----------------------------------------------------- | -----------------------------
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:

----------------------------------------------------- | -----------------------------
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.06KB   84 downloads

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

#15
Tripredacus

Tripredacus

    K-Mart-ian Legend

  • Super Moderator
  • 9,964 posts
  • Joined 28-April 06
  • OS:Server 2012
  • Country: Country Flag

Donator

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:
MSFN RULES | GimageX HTA for PE 3-5 | lol probloms
tpxmsfn1_zps393339c1.jpg

#16
MagicAndre1981

MagicAndre1981

    after Windows 7 GA still Vista lover :)

  • Patrons
  • 6,128 posts
  • Joined 28-August 05
  • OS:Vista Ultimate x86
  • Country: Country Flag

Donator

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

#17
MagicAndre1981

MagicAndre1981

    after Windows 7 GA still Vista lover :)

  • Patrons
  • 6,128 posts
  • Joined 28-August 05
  • OS:Vista Ultimate x86
  • Country: Country Flag

Donator

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
Posted Image

#18
maxXPsoft

maxXPsoft

    MSFN Master

  • Developer
  • 2,889 posts
  • Joined 14-November 03
  • OS:Windows 7 x64
  • Country: Country Flag

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

Edited by maxXPsoft, 05 April 2012 - 07:23 PM.

Download ++> Windows 7 + 8 Unattended DVD + App Installer + Services Disabler + Load All Button + XML Creator
Jump2Reg - Registry: - Oct 4, 2013 - Version 3.0.4 - 98, ME, NT, 2K, XP, VISTA, Seven, Windows 8+ and 32 or 64 bit

XP Unattended CD/DVD creator - Version 4.1.7
Sample xml + Setupcomplete + Add Right click .wim Windows 7 or Windows 8/8.1

#19
CoffeeFiend

CoffeeFiend

    Coffee Aficionado

  • Super Moderator
  • 5,399 posts
  • Joined 14-July 04
  • OS:Windows 7 x64
  • Country: Country Flag

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.

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.

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.
Coffee: \ˈkȯ-fē, ˈkä-\. noun. Heaven in a cup. Life's only treasure. The meaning of life. Kaffee ist wunderbar. C8H10N4O2 FTW.

#20
cdob

cdob

    MSFN Expert

  • Member
  • PipPipPipPipPipPip
  • 1,000 posts
  • Joined 29-September 05
Dism can capture and apply images

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

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.

#21
MagicAndre1981

MagicAndre1981

    after Windows 7 GA still Vista lover :)

  • Patrons
  • 6,128 posts
  • Joined 28-August 05
  • OS:Vista Ultimate x86
  • Country: Country Flag

Donator

if the new dism will also remove from a 7 system source or has anyone tested that?


no, this only works for Windows 8.

Dism can capture and apply images

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

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


thanks for the examples which I didn't wrote in my first post :) :thumbup
Posted Image

#22
rorygilmore

rorygilmore
  • Member
  • 4 posts
  • Joined 13-January 11
  • OS:none specified
  • Country: Country Flag

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:


----------------------------------------------------- | -----------------------------
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:

----------------------------------------------------- | -----------------------------
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.06KB   84 downloads

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



This does nothing when I do it on an offline or online image, it doesn't make the WinSxS anysmaller or anything... weird.

#23
MagicAndre1981

MagicAndre1981

    after Windows 7 GA still Vista lover :)

  • Patrons
  • 6,128 posts
  • Joined 28-August 05
  • OS:Vista Ultimate x86
  • Country: Country Flag

Donator

which features have you disabled?
Posted Image

#24
aryan_ai

aryan_ai
  • Member
  • 4 posts
  • Joined 29-July 08
rorygilmore - I am also seeing same thing

MagicAndre1981 - I tried to remove Hyper V stuff ( all features which starts with Microsoft-Hyper-V-*) and IIS related stuff, but the resulted WIM size is little bigger than original one.


which features have you disabled?



#25
MagicAndre1981

MagicAndre1981

    after Windows 7 GA still Vista lover :)

  • Patrons
  • 6,128 posts
  • Joined 28-August 05
  • OS:Vista Ultimate x86
  • Country: Country Flag

Donator

I think this is the same limitation like Legos Toolkit. The files are removed after you've installed Windows.
Posted Image




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users