Jump to content











Photo
- - - - -

DISM Tool


  • Please log in to reply
17 replies to this topic

#1 darren rose

darren rose

    Frequent Member

  • Advanced user
  • 447 posts
  • Location:Norwich, Norfolk
  •  
    United Kingdom

Posted 16 September 2019 - 04:01 PM

Description:

 

A GUI interface for DISM which works on running OS, a mounted WIM or an offline OS - so can be used from Windows PE

 

Features include: image capture, apply images, export, list packages / drivers / features / capabilities, add/remove drivers, mount/unmount images, check and repair images, get information, diskpart, mount registry and more

 

All comments welcome - hope someone finds it useful

 

Requirements:

 

.NET v4.7.2

 

Screenshots:

 

dism.png

dism2.png

 

Version History:

 

17/12/18 - v1.0 Initial release

 

27/08/19 - v1.1 Updated version to resolve 'To service this Windows image requires the latest version of the DISM' error message

 

29/08/19 - v1.2 Various fixes and improvements including add driver error. Chosen mount path and last mounted image now remembered between sessions, and drivers/features/packages/capabilities lists refreshed after performing add/remove/enable/disable. Warning message displayed upon exit if images still mounted

 

04/09/19 - v1.3 DiskPart GUI tab added which allows you to do everything that DiskPart command line does but in a GUI. You can view volumes / disks, see all disk attributes, format, rename, set/clear read-only flags and eject. You can also easily see what disk a particular volume is located on. There are also preset scripts to create all the required partitions for both GPT and MBR, ready for restoring a WIM image too

 

05/09/19 - v1.4 Added in DLL required for tool to work under Windows 7. Also added ability to append to existing image as well as choose which image index you wish to mount

 

09/09/19 - v1.5 Registry tab added where you can load System, Software or Default User hives from mounted source and edit them

 

11/09/19 - v1.6 Export tab added

 

15/09/19 - v1.7 Get File Info now shows compression type, and compression type now set correctly when exporting image

 

16/09/19 - v1.8 You can now Capture from a drive OR folder, and you can Apply to a drive OR folder

 

19/09/19 - v1.9 Various bug fixes, and improvements made to the Mount tab

 

20/09/19 - v2.0 Changed from storing settings in registry to using an .ini file instead, to make app more portable.  Various other fixes made

 

25/10/19 - v2.1 Exclusion list option added to capture tab

 

31/10/19 - v2.2 Added browse button to select source file location when doing Restore Health, and Fixed export so you can append to an existing WIM file

 

Download:

 

http://www.pcassists...click.php?id=11



#2 Blackcrack

Blackcrack

    Frequent Member

  • Advanced user
  • 412 posts
  •  
    Germany

Posted 17 September 2019 - 02:14 AM

Hi Darren,

nice tool, but it should have a ini file for customizing difrent entrys .. like mount-folder and so on
to hold it portable .. like Mountfolder = ./wim-mount in the folder or if have an extra folder for : .\..\wim-mount
to have a subfolder for the program and have other folders by side in a headfolder.

best regards
Blacky

#3 darren rose

darren rose

    Frequent Member

  • Advanced user
  • 447 posts
  • Location:Norwich, Norfolk
  •  
    United Kingdom

Posted 20 September 2019 - 03:38 PM

Hi Blacky

 

Thanks for response

 

I have now amended the tool to use an .ini file to store mount path, path of last mounted image, and any other settings which needed storing - rather than storing in registry.  So hopefully more portable.

 

Other changes and fixes also made as per first post

 

Let me know any other settings you want saved in .ini file and I will add them where possible



#4 Blackcrack

Blackcrack

    Frequent Member

  • Advanced user
  • 412 posts
  •  
    Germany

Posted 20 September 2019 - 06:58 PM

thanks a lot, therewith is now more portable .. :)
at usb-stick and so :) for technicians :thumpsup:

#5 vigipirate

vigipirate

    Member

  • Members
  • 89 posts
  •  
    France

Posted 25 September 2019 - 07:25 PM

Hello
thank you for dism tool but in capture there is no way for file.ini exclusion liist can you remedy because the capture image will be less important thank you



#6 darren rose

darren rose

    Frequent Member

  • Advanced user
  • 447 posts
  • Location:Norwich, Norfolk
  •  
    United Kingdom

Posted 25 September 2019 - 07:46 PM

Hi vigipirate

 

I will look into adding it, but can't see that the API I am using supports it.  Leave it with me and I will contact developer of the API and see



#7 darren rose

darren rose

    Frequent Member

  • Advanced user
  • 447 posts
  • Location:Norwich, Norfolk
  •  
    United Kingdom

Posted 27 September 2019 - 04:59 PM

Hello
thank you for dism tool but in capture there is no way for file.ini exclusion liist can you remedy because the capture image will be less important thank you

 

Found that I can provide a list of files to exclude, so will now look to add that to my tool

 

Can you give me an example of a file.ini or whatever you would normally use with DISM?

 

Do you just exclude certain filenames? or file types e.g. all .bak files? etc?

 

Give me more of an idea of what you require and I will implement it



#8 alacran

alacran

    Gold Member

  • .script developer
  • 1122 posts
  •  
    Mexico

Posted 28 September 2019 - 04:28 AM

Hi daren rose:

 

Exclusion list is called WimScript.ini by DISM or wimlib.imagex

 

This is the exclusion list used internally by wimlib.imagex during standard capture:

[ExclusionList]
\$ntfs.log
\hiberfil.sys
\pagefile.sys
\swapfile.sys
\System Volume Information
\RECYCLER
\$RECYCLE.BIN
\$Recycle.Bin
\Windows\CSC

By default, the DISM.exe tool will exclude the following files.

[ExclusionList]
\$ntfs.log
\hiberfil.sys
\pagefile.sys
\swapfile.sys
\System Volume Information
\RECYCLER
\Windows\CSC

[CompressionExclusionList]
*.mp3
*.zip
*.cab
\WINDOWS\inf\*.pnf

Source and additional info (including how to customize it): https://docs.microso...i-files-winnext

 

Also since Win8.1 Update 1 there is the file Windows\System32\WimBootCompress.ini for capture and apply on wimboot mode (using DISM or wimlib.imagex), and it can be customized too, as an example see one of my last versions here: http://reboot.pro/to...e-6#entry209949

 

Later I added \MSOCache\* under [ExclusionList]

 

Hope this was of some help.

 

It is sad your tool require .NET v4.7.2 wich is not usually included on WinPE(s) because it is excessively heavy.

 

Best Regards

 

alacran



#9 Rocky Essing

Rocky Essing

    Newbie

  • Members
  • 16 posts
  •  
    United States

Posted 28 September 2019 - 07:32 AM

Does this have any capability for handling .esd files?  If not, then I would recommend that as a feature. Even if you only added the ability to convert install.esd to a .wim. The current version of dism supports this:

 

 

dism /export-image /SourceImageFile:install.esd /SourceIndex:1 /DestinationImageFile:install.wim /Compress:max /CheckIntegrity

 


#10 darren rose

darren rose

    Frequent Member

  • Advanced user
  • 447 posts
  • Location:Norwich, Norfolk
  •  
    United Kingdom

Posted 28 September 2019 - 11:22 AM

@alacran

 

Thanks for that - will look into adding the support

 

Since it uses a .NET library for the DISM and WIMG API I use I had no choice

 

@Rocky Essing

 

I will look into adding at least the conversion method - I think my export tab does support it but for now I had just done WIM, but leave it with me.  I can't seem to find a ESD file here so any links to a small one I can test on would be handy



#11 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 15060 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 28 September 2019 - 05:05 PM

Not really-really an original name, if I may, JFYI:

 

https://msfn.org/boa...nje-dism-tool™/

 

:duff:

Wonko



#12 darren rose

darren rose

    Frequent Member

  • Advanced user
  • 447 posts
  • Location:Norwich, Norfolk
  •  
    United Kingdom

Posted 28 September 2019 - 08:33 PM

The name was kept simple - "it does what it says on the tin" so to speak. 

 

Didn't want to give it some odd convoluted name which didn't clearly state what it does

 

And that example which I had seen doesn't look like it had been updated in years



#13 Blackcrack

Blackcrack

    Frequent Member

  • Advanced user
  • 412 posts
  •  
    Germany

Posted 29 September 2019 - 08:20 AM

wth...
@@Wonko, is this your program or a foreign Program
*slap on the fingers*
so let the fingers off of the program name ..
*With the sledge hammer swinging warningly*

Darren, it's all okey :)
Wonko is only sometimes a bit insane ... ( yes, i mean crazy *bg*)
Jing/Jang -> Sane/insane you see *bg* (*giggle*)

hmm... mounting wim, why then not checking the updates for the actual mounted wim
and put it in an own ./windowsUpdateMedium-%date% folder to have a possible for building up a
update-installed-system possibility, i have make a batch where i have the possibility to install all actuall updates with a scrip,
but it is manually arranging and setting up to have a updatefolder for a actual month, so, why not give the possibility to make it something possibility,
take a look at the attachement.

In the same folder be the whole updates and files where be called. But this files need drives and can not run over UNC-Path..

Maybe can you let make a exefile via array in the update-folder and compressed with 7zip-sfx "servcepack_update_to_YYYY.MM.DD-hh:mm" as snapshot for fresh
installed systems. (executable over UNC-File System, like over Samba or from a WinNT-Admin server without a Drive-Letter a.E.: //Linuxserver/Windows/Service/Updatepacks/)

maybe is this a Idea/suggestion for you, this could be very helpul for different admins for building easy servicepacks for
fresh installed systems, out of the mounted wim-files, a inofficially servicepack builder ... or Update-Snapshot Builder with a iso/sfx/usb/update-folder-builder

For updateroutne -> 0-System-update.exe
maybe in the 0-System-update.exe ("0-" for stay at first with the name ) a routine for checking up the sequence of updates and add a "runeonce" regkey && "reboot" up to all msi-files be installed.
if call reboot, check if all install, if no, add the 0-System-update.exe to runonce Regpath, if all installed, remove the regkey. (like i know.. exist a runonce.exe )
if wusa call a reboot, and not all files be installed, add regkey for 0-System-update.exe runonce and make a "shutdown /r /t 0"
Up to be all installed and the System actual .


best regards
Blacky

 

http://www.blackysga...ot/batch-files/



#14 darren rose

darren rose

    Frequent Member

  • Advanced user
  • 447 posts
  • Location:Norwich, Norfolk
  •  
    United Kingdom

Posted 2 weeks ago

Hello
thank you for dism tool but in capture there is no way for file.ini exclusion liist can you remedy because the capture image will be less important thank you

 

exclusion list option added to capture tab



#15 antonino61

antonino61

    Frequent Member

  • Advanced user
  • 454 posts
  •  
    Italy

Posted 2 weeks ago

well, it is nice and lite, it yields good images, which wimboot can apply to vhd ok. the only things of it are wimb's wimboot calls the vhd with a name that reminds us of an x86 system but if one checks better they are x64 perfectly alright (funny, though), and if u try applying the wim to standalone vhd (not wimb's wimboot), the vhd will not boot ok, insomuch as it does not arrive at the desktop interface. I think these are a few solvable "glitches", perhaps caused by some funny wimbootcompress.ini. if i were u I would have a chat with wimb the flying dutchman for full compatibility, as ur tool is generally nice and handy.

nino



#16 alacran

alacran

    Gold Member

  • .script developer
  • 1122 posts
  •  
    Mexico

Posted 2 weeks ago

JFYI:

 

There have been found recently some problems (on wimboot mode installs) when using a custom WimbootCompress.ini with wimgapi.dll based tools as Dism, and WinNTSetup.

 

See JFX (WinNTSetup author) final conclusion: https://msfn.org/boa...comment=1171109

 

Followed by:

 

This is wimb answer: https://msfn.org/boa...comment=1171113

 

My answer: https://msfn.org/boa...comment=1171114

 

And if you want deeper info of troubles found and tests made, start reading here: https://msfn.org/boa...comment=1170926

 

Then when using this approach (modiffied WimbootCompress.ini) it is better to use wimlib (command line only) or with its GUI wimlib-clc

 

alacran


  • wimb likes this

#17 antonino61

antonino61

    Frequent Member

  • Advanced user
  • 454 posts
  •  
    Italy

Posted 2 weeks ago

sorry Darren Rose,

everything ok here as regards plain vhd.vhd (non wimboot) applied from a wim as a standalone. The first attempt failed because of a miscompression here on my nvme. 2nd attempt booted ok. let me try wimboot now.

nino



#18 antonino61

antonino61

    Frequent Member

  • Advanced user
  • 454 posts
  •  
    Italy

Posted A week ago

My credit to darren rose for "guaranteeing" "wysiwyg" when capturing a standalone vhd into a corresponding wim. What is more, this wim can be wimboot-applied to a resulting vhd (even if, way down the road, it says not compatible. with the following wimbootcompress.ini

 

[CompressionExclusionList]
ntoskrnl.exe
 
[PrepopulateList]
\bootmgr
\Boot\BCD
*winload.*
 
[ExclusionList]
 
[CompressionFolderList]
 
u will get a 1gb vhd that can be shrunk even further without any used-space bulge, at least so far (I managed to shrink mine to 750mb and I am watching it right now, no hindrance yet). I can see it as a valid alternative to winntsetup, at least in terms of fidelity to the source. 
 
what does not work is the re-wimbooting from  a vhd+wim so obtained as above, which means that if u need to install a new driver (say a videocard driver), u'll have to do it from the source standalone vhd, recapture thru dism tool and re-wimboot. If u do so, it will be perfect, at least so far or unless specified otherwise.





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users