Topic: DISM Tool  (Read 2788 times)

DISM Tool
« on: December 04, 2018, 10:25:04 PM »

dazza

  • Chef
  • ***
  • Date Registered: Jan 2017
  • Posts: 244
As promised in another post (http://theoven.org/index.php?topic=2608.msg28585#msg28585) I have been working on a new DISM tool which makes use of the .NET API available for both DISM and WIMGAPI

This is a very early version and I still have lots of testing to do, and more improvements I want to make, but it does work both on a host PC scanning the current OS or a mounted WIM, and also within Windows PE to scan an offline system and add/remove package, drivers, features etc. 

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

It should work on 32-bit and 64-bit and requires .NET 4.7.2

All comments welcome  :wink:

17/12/18 v1.0

Initial release

ila_rendered

ila_rendered

« Last Edit: September 16, 2019, 03:56:55 PM by dazza »

Re: DISM Tool
« Reply #1 on: August 27, 2019, 03:14:46 PM »

dazza

  • Chef
  • ***
  • Date Registered: Jan 2017
  • Posts: 244
27/08/19 - v1.1

Updated version to resolve 'To service this Windows image requires the latest version of the DISM' error message
« Last Edit: August 29, 2019, 07:29:19 PM by dazza »

Re: DISM Tool
« Reply #2 on: August 29, 2019, 07:30:03 PM »

dazza

  • Chef
  • ***
  • Date Registered: Jan 2017
  • Posts: 244
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
« Last Edit: September 04, 2019, 10:27:43 PM by dazza »

Re: DISM Tool
« Reply #3 on: August 29, 2019, 11:09:01 PM »

gbrao

  • Chef
  • ***
  • Date Registered: Sep 2011
  • Posts: 258
Hi, thanks.
Both for the program and for saving me some work (I too started working on a similar program, will give up :-)
I was using AutoIt, quite painful.

Some observations:
Can you provide a option for the user to select which DISM.EXE he wants to use.
I don't see Append-Image. And Get-ImageInfo.
Finally, when I started I had this doubt : does DISM only work with drives (MS doc only mentions drives) or also with directories. I tried, works with directories too. Don't know if you think it's worth implementing.

Attaching two screenshots of my prog.
« Last Edit: August 29, 2019, 11:15:25 PM by gbrao »

Re: DISM Tool
« Reply #4 on: August 30, 2019, 06:30:10 AM »

SIW2

  • Code Baker
  • Chef
  • ***
  • Date Registered: Jul 2012
  • Posts: 197
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

DISM_Tool.7z

You might want to add this: * Heap-Obsolete-L1-1-0.zip (1.17 kB - downloaded 46 times.)

Re: DISM Tool
« Reply #5 on: August 30, 2019, 08:59:40 AM »

dazza

  • Chef
  • ***
  • Date Registered: Jan 2017
  • Posts: 244
You might want to add this: (Attachment Link)

Any clues as to what it is and why I might need to add it???

Re: DISM Tool
« Reply #6 on: August 30, 2019, 09:58:53 AM »

APT

  • Grand Chef
  • *****
  • winpe enthusiast
  • Location: UK
  • Date Registered: Nov 2012
  • Posts: 1150
Hi
Quote
Any clues as to what it is and why I might need to add it???

I'm guessing for SIW2, but if you try to run straight from a win7 desktop, it complains it's missing
It's description is a ApiSet Stub DLL

ila_rendered
« Last Edit: August 30, 2019, 10:04:47 AM by APT »

Re: DISM Tool
« Reply #7 on: August 30, 2019, 10:32:13 AM »

dazza

  • Chef
  • ***
  • Date Registered: Jan 2017
  • Posts: 244
Okay thanks APT, hadn't tested on Windows 7 as all my computers here run Windows 10 - will check it out, and find out if I can redistribute that file with my app without breaking any licencing terms etc

Re: DISM Tool
« Reply #8 on: August 30, 2019, 08:22:07 PM »

dazza

  • Chef
  • ***
  • Date Registered: Jan 2017
  • Posts: 244
Hi, thanks.
Both for the program and for saving me some work (I too started working on a similar program, will give up :-)
I was using AutoIt, quite painful.

Some observations:
Can you provide a option for the user to select which DISM.EXE he wants to use.
I don't see Append-Image. And Get-ImageInfo.
Finally, when I started I had this doubt : does DISM only work with drives (MS doc only mentions drives) or also with directories. I tried, works with directories too. Don't know if you think it's worth implementing.

Hi, thanks for posting

Get-ImageInfo is on the Misc tab - button titled Get File Info

I'm not sure the library I am using (https://github.com/jeffkl/ManagedWimgApi) supports Append-Image - or at least I haven't seen it - I will inquire and get back to you, if it does I will add it

Will put idea of directories on my "to do" list - but my main requirement was for drives so not sure if needed or not

Re: DISM Tool
« Reply #9 on: September 04, 2019, 10:28:29 PM »

dazza

  • Chef
  • ***
  • Date Registered: Jan 2017
  • Posts: 244
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.

I have also added ability to easily see which volumes belong to which disks, so you can easily see what disk drive C: is using etc - handy for imaging purposes so you don't wipe or write over wrong location

There are also preset scripts to create all the required partitions for both GPT and MBR, ready for restoring a WIM image too.

ila_rendered
« Last Edit: September 05, 2019, 12:59:48 PM by dazza »

Re: DISM Tool
« Reply #10 on: September 04, 2019, 10:44:14 PM »

APT

  • Grand Chef
  • *****
  • winpe enthusiast
  • Location: UK
  • Date Registered: Nov 2012
  • Posts: 1150
Hi dazza

thanks for the update
I notice in the log, just from opening there seems to be a warning message (win7)

edit
attachment doesn't show up in post for me, but does in edit? Not sure why, will place in manually
Quote
2019-09-04 23:40:30, Warning               DISM   DISM Provider Store: PID=6052 TID=6028 There is a possible 32-bit versus 64-bit cross architecture issue with the provider (or one of its dependencies). - CDISMProviderStore::Internal_LoadProvider(hr:0x800700c1)
2019-09-04 23:40:30, Warning               DISM   DISM Provider Store: PID=6052 TID=6028 Failed to load the provider: C:\Users\APT\Downloads\DISM_Tool\FfuProvider.dll. - CDISMProviderStore::Internal_GetProvider(hr:0x800700c1)
2019-09-04 23:40:34, Warning               DISM   DISM Provider Store: PID=6052 TID=6028 Failed to retrieve the Provider Instance. - CDISMProviderStore::Internal_GetProvider(hr:0x80004005)
« Last Edit: September 04, 2019, 11:00:07 PM by APT »

Re: DISM Tool
« Reply #11 on: September 04, 2019, 11:07:55 PM »

dazza

  • Chef
  • ***
  • Date Registered: Jan 2017
  • Posts: 244
Hi dazza

thanks for the update
I notice in the log, just from opening there seems to be a warning message (win7)

edit
attachment doesn't show up in post for me, but does in edit? Not sure why, will place in manually
Quote
2019-09-04 23:40:30, Warning               DISM   DISM Provider Store: PID=6052 TID=6028 There is a possible 32-bit versus 64-bit cross architecture issue with the provider (or one of its dependencies). - CDISMProviderStore::Internal_LoadProvider(hr:0x800700c1)
2019-09-04 23:40:30, Warning               DISM   DISM Provider Store: PID=6052 TID=6028 Failed to load the provider: C:\Users\APT\Downloads\DISM_Tool\FfuProvider.dll. - CDISMProviderStore::Internal_GetProvider(hr:0x800700c1)
2019-09-04 23:40:34, Warning               DISM   DISM Provider Store: PID=6052 TID=6028 Failed to retrieve the Provider Instance. - CDISMProviderStore::Internal_GetProvider(hr:0x80004005)
I must admit I am all Windows 10 here so not had chance to test it on Windows 7, but the DISM log does seem to fill with a lot of errors generally, most of which seem meaningless as all testing I have done seems to work so far.  If I get a moment I will find a Windows 7 machine from somewhere and give it a test

UPDATE: have tested it now under Windows 7 and all seems to work fine as long as has DLL mentioned in posts above (and now included in package) - the errors about FfuProvider.dll are misleading in the log and don't affect operation, I get same logs on a Windows 8.1 machine here too
« Last Edit: September 05, 2019, 01:03:05 PM by dazza »

Re: DISM Tool
« Reply #12 on: September 05, 2019, 01:02:02 PM »

dazza

  • Chef
  • ***
  • Date Registered: Jan 2017
  • Posts: 244
05/09/19 - v1.4

Included DLL required for tool to work under Windows 7 (thanks SIW2)

N.B. If you get error under Windows 7 about missing file api-ms-win-core-localization-l1-2-0.dll then install Update for Universal C Runtime in Windows from https://support.microsoft.com/en-us/help/2999226/update-for-universal-c-runtime-in-windows 

Also added in ability to append to existing image, and option to choose with image index you wish to mount


« Last Edit: September 09, 2019, 07:50:30 PM by dazza »

Re: DISM Tool
« Reply #13 on: September 05, 2019, 01:05:25 PM »

dazza

  • Chef
  • ***
  • Date Registered: Jan 2017
  • Posts: 244
I don't see Append-Image. And Get-ImageInfo.

Get-ImageInfo is on the Misc tab - button titled Get File Info

I have now amended code so you can append to an existing image by ticking "Append Existing Image" checkbox on Capture tab
Also now on the Mount tab you can select which image you wish to mount

Re: DISM Tool
« Reply #14 on: September 05, 2019, 11:11:51 PM »

bob.omb

  • Code Baker
  • Grand Chef
  • *****
  • Location: USA
  • Date Registered: Jul 2017
  • Posts: 1261
I wish I would have grabbed the DISM++ source before the chinese government took down their site. Its even gone from github: https://github.com/Chuyu-Team

Probably would have helped speed things along..

Re: DISM Tool
« Reply #15 on: September 05, 2019, 11:18:35 PM »

dazza

  • Chef
  • ***
  • Date Registered: Jan 2017
  • Posts: 244
I wish I would have grabbed the DISM++ source before the chinese government took down their site. Its even gone from github: https://github.com/Chuyu-Team

Probably would have helped speed things along..
The Chuyu main website is back up again, but seems a lot of confusion as to whether it was ever open source or the source available despite wording on main page - discussed in more detail here https://github.com/Chuyu-Team/Dism-Multi-language/issues/548

Re: DISM Tool
« Reply #16 on: September 09, 2019, 07:51:02 PM »

dazza

  • Chef
  • ***
  • Date Registered: Jan 2017
  • Posts: 244
09/09/19 - v1.5

Registry tab added where you can load System, Software or Default User hives from mounted source and edit them


« Last Edit: September 11, 2019, 12:32:28 PM by dazza »

Re: DISM Tool
« Reply #17 on: September 11, 2019, 12:32:44 PM »

dazza

  • Chef
  • ***
  • Date Registered: Jan 2017
  • Posts: 244
11/09/19 - v1.6

Export tab added

« Last Edit: September 15, 2019, 05:35:09 PM by dazza »

Re: DISM Tool
« Reply #18 on: September 15, 2019, 05:37:07 PM »

dazza

  • Chef
  • ***
  • Date Registered: Jan 2017
  • Posts: 244
15/09/19 - v1.7

Now shows compression level for Get File Info, and also sets correct compression level when exporting an image (destination compression had to be set to same as what the source compression was)

« Last Edit: September 16, 2019, 03:40:30 PM by dazza »

Re: DISM Tool
« Reply #19 on: September 16, 2019, 03:41:52 PM »

dazza

  • Chef
  • ***
  • Date Registered: Jan 2017
  • Posts: 244
16/09/19 - v1.8

You can now Capture from a drive OR folder, and you can Apply to a drive OR folder - (as requested by gbrao and Jan)

« Last Edit: September 19, 2019, 07:13:17 PM by dazza »

 

Powered by EzPortal