[REG] Add DISM Info context menu to .esd .wim .cab

Discussion in 'Windows 10' started by BAU, Apr 24, 2018.

  1. BAU

    BAU MDL Senior Member

    Feb 10, 2009
    287
    434
    10
    #1 BAU, Apr 24, 2018
    Last edited: Nov 6, 2018

    Attached Files:

  2. Warrentheo

    Warrentheo MDL Novice

    Jun 1, 2018
    1
    3
    0
    I changed my line to be

    Code:
    @="powershell -c \"Start-Process cmd -ArgumentList '/c dism /Get-ImageInfo /ImageFile:\\\"%1\\\" &echo ************************************************************************************************************************ &dism /Get-ImageInfo /ImageFile:\\\"%1\\\" /index:1 &echo. &pause' -verb RunAs\""
    
    This runs DISM 2x, once with the command from the original post, and an extra time to show the version info from the first distro in the file... That way you can see the version info from the file as well...
     
  3. dhjohns

    dhjohns MDL Guru

    Sep 5, 2013
    3,276
    1,731
    120
    I'm lovin' this!
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  4. MrChris

    MrChris MDL Senior Member

    Jun 23, 2007
    472
    102
    10
    Thanks. NICE Share!
     
  5. BAU

    BAU MDL Senior Member

    Feb 10, 2009
    287
    434
    10
    #5 BAU, Jun 2, 2018
    Last edited: Jun 2, 2018
    (OP)
    Approved! Added to OP, but in reversed order and listing first 3 indexes (index 1,2,3, then original listing of all indexes).
    Also added a limited .msu info (only unpacks *pkgProperties.txt).
    Switched to HKCR since it's more reliable, HKCU had issues with 7-zip associations breaking .wim context for example.
     
  6. dhjohns

    dhjohns MDL Guru

    Sep 5, 2013
    3,276
    1,731
    120
    @BAU could you do me a huge favor, and put up your ORIGINAL code with @Warrentheo 's edit. That one worked best for me. The one you have now has errors errors errors. Unfortunately I did not save your original which was much better.
    Deployment Image Servicing and Management tool
    Version: 10.0.17682.1000

    Details for image : F:\Decrypters\uup-converter-wimlib-14\17677.1000.180520-0940.RS_PRERELEASE_CLIENTCORE_OEMRET_X64FRE_EN-US\sources\install.wim

    Index : 1
    Name : Windows 10 Remote Desktop Session Host
    Description : Windows 10 Remote Desktop Session Host
    Size : 16,010,065,609 bytes
    WIM Bootable : No
    Architecture : x64
    Hal : <undefined>
    Version : 10.0.17677
    ServicePack Build : 1000
    ServicePack Level : 0
    Edition : ServerRdsh
    Installation : Client
    ProductType : WinNT
    ProductSuite : Terminal Server
    System Root : WINDOWS
    Directories : 21635
    Files : 98561
    Created : Monday 5 21 2018 - 2:59:06 Ante Meridiem
    Modified : Monday 5 28 2018 - 1:52:14 Ante Meridiem
    Languages :
    en-US (Default)
    The operation completed successfully.

    Deployment Image Servicing and Management tool
    Version: 10.0.17682.1000


    Error: 0xc1560111

    The specified image does not exist in the specified image container.
    Check the image container first for existing images.

    The DISM log file can be found at C:\Windows\Logs\DISM\dism.log

    Deployment Image Servicing and Management tool
    Version: 10.0.17682.1000


    Error: 0xc1560111

    The specified image does not exist in the specified image container.
    Check the image container first for existing images.

    The DISM log file can be found at C:\Windows\Logs\DISM\dism.log


    Deployment Image Servicing and Management tool
    Version: 10.0.17682.1000

    Details for image : F:\Decrypters\uup-converter-wimlib-14\17677.1000.180520-0940.RS_PRERELEASE_CLIENTCORE_OEMRET_X64FRE_EN-US\sources\install.wim

    Index : 1
    Name : Windows 10 Remote Desktop Session Host
    Description : Windows 10 Remote Desktop Session Host
    Size : 16,010,065,609 bytes

    The operation completed successfully.

    Press any key to continue . . .
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  7. BAU

    BAU MDL Senior Member

    Feb 10, 2009
    287
    434
    10
    That's "by design". It asks for index 1 2 3 so if the image does not have them it will return an error that you can 100% ignore.
    Anyway, this is the original:
    Code:
    Windows Registry Editor Version 5.00
    
    [-HKEY_CURRENT_USER\Software\Classes\.esd\shell\DISMinfo]
    
    [HKEY_CURRENT_USER\Software\Classes\.esd\shell\DISMinfo]
    "MUIVerb"="DISM Info"
    "Icon"="C:\\Windows\\HelpPane.exe"
    "CommandFlags"=dword:00000010
    
    [HKEY_CURRENT_USER\Software\Classes\.esd\shell\DISMinfo\command]
    @="powershell -c \"Start-Process cmd -ArgumentList '/c dism /Get-ImageInfo /ImageFile:\\\"%1\\\" &echo. &pause' -verb RunAs\""
    
    [-HKEY_CURRENT_USER\Software\Classes\.wim\shell\DISMinfo]
    
    [HKEY_CURRENT_USER\Software\Classes\.wim\shell\DISMinfo]
    "MUIVerb"="DISM Info"
    "Icon"="C:\\Windows\\HelpPane.exe"
    "CommandFlags"=dword:00000010
    
    [HKEY_CURRENT_USER\Software\Classes\.wim\shell\DISMinfo\command]
    @="powershell -c \"Start-Process cmd -ArgumentList '/c dism /Get-ImageInfo /ImageFile:\\\"%1\\\" &echo. &pause' -verb RunAs\""
    
    [-HKEY_CURRENT_USER\Software\Classes\CABFolder\shell\DISMinfo]
    
    [HKEY_CURRENT_USER\Software\Classes\CABFolder\shell\DISMinfo]
    "MUIVerb"="DISM Info"
    "Icon"="C:\\Windows\\HelpPane.exe"
    "CommandFlags"=dword:00000010
    
    [HKEY_CURRENT_USER\Software\Classes\CABFolder\shell\DISMinfo\command]
    @="powershell -c \"Start-Process cmd -ArgumentList '/c dism /Online /Get-PackageInfo /PackagePath:\\\"%1\\\" &echo. &pause' -verb RunAs\""
    
     
  8. dhjohns

    dhjohns MDL Guru

    Sep 5, 2013
    3,276
    1,731
    120
    Thank you for the file, and the explanation!
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  9. dhjohns

    dhjohns MDL Guru

    Sep 5, 2013
    3,276
    1,731
    120
    The original does not return errors with a single index wim. :) I really do not like to ignore errors. Errors in coding should not be present. I am sure this is fixable.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  10. Enthousiast

    Enthousiast MDL Tester

    Oct 30, 2009
    17,144
    21,708
    340
    Those are not real errors, the script checks for indices and if they don't exist the script returns an error. It should never report index 1 is missing, because an empty install.wim can't exist. But i wonder up to what nr it will check for indices?
     
  11. dhjohns

    dhjohns MDL Guru

    Sep 5, 2013
    3,276
    1,731
    120
    #11 dhjohns, Jun 2, 2018
    Last edited: Jun 2, 2018
    I understand they are not real errors, but if the "not real errors" are not present in the first rendition, then why are they present in the second rendition. The first code works, but doesn't return errors. Why should I want to or put up with looking at errors which are not real. If I want to see things which aren't real I will drop acid. ;)
    Deployment Image Servicing and Management tool
    Version: 10.0.17682.1000

    Details for image : F:\Decrypters\uup-converter-wimlib-14\17682.1000.180525-1616.RS_PRERELEASE_CLIENTCORE_OEMRET_X64FRE_EN-US\sources\install.wim

    Index : 1
    Name : Windows 10 Remote Desktop Session Host Insider Preview
    Description : Windows 10 Remote Desktop Session Host Insider Preview
    Size : 14,705,550,422 bytes

    The operation completed successfully.
    ************************************************************************************************************************

    Deployment Image Servicing and Management tool
    Version: 10.0.17682.1000

    Details for image : F:\Decrypters\uup-converter-wimlib-14\17682.1000.180525-1616.RS_PRERELEASE_CLIENTCORE_OEMRET_X64FRE_EN-US\sources\install.wim

    Index : 1
    Name : Windows 10 Remote Desktop Session Host Insider Preview
    Description : Windows 10 Remote Desktop Session Host Insider Preview
    Size : 14,705,550,422 bytes
    WIM Bootable : No
    Architecture : x64
    Hal : <undefined>
    Version : 10.0.17682
    ServicePack Build : 1000
    ServicePack Level : 0
    Edition : ServerRdsh
    Installation : Client
    ProductType : WinNT
    ProductSuite : Terminal Server
    System Root : WINDOWS
    Directories : 19462
    Files : 90794
    Created : Saturday 5 26 2018 - 5:43:10 Ante Meridiem
    Modified : Saturday 6 2 2018 - 1:45:36 Ante Meridiem
    Languages :
    en-US (Default)
    The operation completed successfully.

    Press any key to continue . . .
    Windows Registry Editor Version 5.00

    [-HKEY_CURRENT_USER\Software\Classes\.esd\shell\DISMinfo]

    [HKEY_CURRENT_USER\Software\Classes\.esd\shell\DISMinfo]
    "MUIVerb"="DISM Info"
    "Icon"="C:\\Windows\\HelpPane.exe"
    "CommandFlags"=dword:00000010

    [HKEY_CURRENT_USER\Software\Classes\.esd\shell\DISMinfo\command]
    @="powershell -c \"Start-Process cmd -ArgumentList '/c dism /Get-ImageInfo /ImageFile:\\\"%1\\\" &echo ************************************************************************************************************************ &dism /Get-ImageInfo /ImageFile:\\\"%1\\\" /index:1 &echo. &pause' -verb RunAs\""

    [-HKEY_CURRENT_USER\Software\Classes\.wim\shell\DISMinfo]

    [HKEY_CURRENT_USER\Software\Classes\.wim\shell\DISMinfo]
    "MUIVerb"="DISM Info"
    "Icon"="C:\\Windows\\HelpPane.exe"
    "CommandFlags"=dword:00000010

    [HKEY_CURRENT_USER\Software\Classes\.wim\shell\DISMinfo\command]
    @="powershell -c \"Start-Process cmd -ArgumentList '/c dism /Get-ImageInfo /ImageFile:\\\"%1\\\" &echo ************************************************************************************************************************ &dism /Get-ImageInfo /ImageFile:\\\"%1\\\" /index:1 &echo. &pause' -verb RunAs\""

    [-HKEY_CURRENT_USER\Software\Classes\CABFolder\shell\DISMinfo]

    [HKEY_CURRENT_USER\Software\Classes\CABFolder\shell\DISMinfo]
    "MUIVerb"="DISM Info"
    "Icon"="C:\\Windows\\HelpPane.exe"
    "CommandFlags"=dword:00000010

    [HKEY_CURRENT_USER\Software\Classes\CABFolder\shell\DISMinfo\command]
    @="powershell -c \"Start-Process cmd -ArgumentList '/c dism /Get-ImageInfo /ImageFile:\\\"%1\\\" &echo ************************************************************************************************************************ &dism /Get-ImageInfo /ImageFile:\\\"%1\\\" /index:1 &echo. &pause' -verb RunAs\""
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  12. pf100

    pf100 MDL Expert

    Oct 22, 2010
    1,158
    1,553
    60
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  13. dhjohns

    dhjohns MDL Guru

    Sep 5, 2013
    3,276
    1,731
    120
    Deployment Image Servicing and Management tool
    Version: 10.0.17682.1000

    Details for image : Q:\sources\install.wim

    Index : 1
    Name : Windows 10 Home
    Description : Windows 10 Home
    Size : 15,424,128,545 bytes

    Index : 2
    Name : Windows 10 Home N
    Description : Windows 10 Home N
    Size : 14,353,504,148 bytes

    Index : 3
    Name : Windows 10 Home Single Language
    Description : Windows 10 Home Single Language
    Size : 15,424,175,971 bytes

    Index : 4
    Name : Windows 10 Education
    Description : Windows 10 Education
    Size : 15,644,169,970 bytes

    Index : 5
    Name : Windows 10 Education N
    Description : Windows 10 Education N
    Size : 14,571,793,777 bytes

    Index : 6
    Name : Windows 10 Pro
    Description : Windows 10 Pro
    Size : 15,644,048,998 bytes

    Index : 7
    Name : Windows 10 Pro N
    Description : Windows 10 Pro N
    Size : 14,571,634,425 bytes

    Index : 8
    Name : Windows 10 Pro Education
    Description : Windows 10 Pro Education
    Size : 15,644,097,358 bytes

    Index : 9
    Name : Windows 10 Pro Education N
    Description : Windows 10 Pro Education N
    Size : 14,571,720,265 bytes

    Index : 10
    Name : Windows 10 Pro for Workstations
    Description : Windows 10 Pro for Workstations
    Size : 15,644,133,430 bytes

    Index : 11
    Name : Windows 10 Pro N for Workstations
    Description : Windows 10 Pro N for Workstations
    Size : 14,571,756,787 bytes

    The operation completed successfully.
    ************************************************************************************************************************

    Deployment Image Servicing and Management tool
    Version: 10.0.17682.1000

    Details for image : Q:\sources\install.wim

    Index : 1
    Name : Windows 10 Home
    Description : Windows 10 Home
    Size : 15,424,128,545 bytes
    WIM Bootable : No
    Architecture : x64
    Hal : <undefined>
    Version : 10.0.17134
    ServicePack Build : 1
    ServicePack Level : 1
    Edition : Core
    Installation : Client
    ProductType : WinNT
    ProductSuite : Terminal Server
    System Root : WINDOWS
    Directories : 20726
    Files : 101037
    Created : Thursday 4 12 2018 - 5:28:33 Ante Meridiem
    Modified : Thursday 4 12 2018 - 6:16:29 Ante Meridiem
    Languages :
    en-US (Default)
    The operation completed successfully.

    Press any key to continue . . .
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  14. Enthousiast

    Enthousiast MDL Tester

    Oct 30, 2009
    17,144
    21,708
    340
    So, it only would show an error for index 2 and 3 on an one index wim/esd.
    :thinking: Why doesn't it simply list all existing indices?
     
  15. dhjohns

    dhjohns MDL Guru

    Sep 5, 2013
    3,276
    1,731
    120
    Inquiring minds want to know. I stick with first rendition which does not report imaginary errors.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  16. Enthousiast

    Enthousiast MDL Tester

    Oct 30, 2009
    17,144
    21,708
    340
    That one probably just lists all existing indices, so no errors ;)
     
  17. dhjohns

    dhjohns MDL Guru

    Sep 5, 2013
    3,276
    1,731
    120
    Is not that what it is supposed to do?
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  18. Enthousiast

    Enthousiast MDL Tester

    Oct 30, 2009
    17,144
    21,708
    340
    Tell BAU, not me;):D
     
  19. dhjohns

    dhjohns MDL Guru

    Sep 5, 2013
    3,276
    1,731
    120
    You here that @BAU ?
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  20. dhjohns

    dhjohns MDL Guru

    Sep 5, 2013
    3,276
    1,731
    120
    #20 dhjohns, Jun 2, 2018
    Last edited: Jun 2, 2018
    Windows Registry Editor Version 5.00

    ;HKCU unreliable, more so if having 7-Zip shell extensions, hence switched to HKCR
    [-HKEY_CURRENT_USER\Software\Classes\.esd\shell\DISMinfo]
    [-HKEY_CURRENT_USER\Software\Classes\.wim\shell\DISMinfo]
    [-HKEY_CURRENT_USER\Software\Classes\CABFolder\shell\DISMinfo]

    [-HKEY_CLASSES_ROOT\.esd\shell\DISMinfo]

    [HKEY_CLASSES_ROOT\.esd\shell\DISMinfo]
    "MUIVerb"="DISM Info"
    "Icon"="C:\\Windows\\HelpPane.exe"
    "CommandFlags"=dword:00000010

    [HKEY_CLASSES_ROOT\.esd\shell\DISMinfo\command]
    @="powershell -c \"Start-Process cmd -ArgumentList '/c dism /Get-ImageInfo /ImageFile:\\\"%1\\\" &echo ************************************************************************************************************************ &dism /Get-ImageInfo /ImageFile:\\\"%1\\\" /index:1 &echo. &pause' -verb RunAs\""

    [-HKEY_CLASSES_ROOT\.wim\shell\DISMinfo]

    [HKEY_CLASSES_ROOT\.wim\shell\DISMinfo]
    "MUIVerb"="DISM Info"
    "Icon"="C:\\Windows\\HelpPane.exe"
    "CommandFlags"=dword:00000010

    [HKEY_CLASSES_ROOT\.wim\shell\DISMinfo\command]
    @="powershell -c \"Start-Process cmd -ArgumentList '/c dism /Get-ImageInfo /ImageFile:\\\"%1\\\" &echo ************************************************************************************************************************ &dism /Get-ImageInfo /ImageFile:\\\"%1\\\" /index:1 &echo. &pause' -verb RunAs\""

    [-HKEY_CLASSES_ROOT\CABFolder\shell\DISMinfo]

    [HKEY_CLASSES_ROOT\CABFolder\shell\DISMinfo]
    "MUIVerb"="DISM Info"
    "Icon"="C:\\Windows\\HelpPane.exe"
    "CommandFlags"=dword:00000010

    [HKEY_CLASSES_ROOT\CABFolder\shell\DISMinfo\command]
    @="powershell -c \"Start-Process cmd -ArgumentList '/c dism /Online /Get-PackageInfo /PackagePath:\\\"%1\\\" &echo. &pause' -verb RunAs\""

    [-HKEY_CLASSES_ROOT\Microsoft.System.Update.1\shell\DISMinfo]

    [HKEY_CLASSES_ROOT\Microsoft.System.Update.1\shell\DISMinfo]
    "MUIVerb"="DISM Info"
    "Icon"="C:\\Windows\\HelpPane.exe"
    "CommandFlags"=dword:00000010

    [HKEY_CLASSES_ROOT\Microsoft.System.Update.1\shell\DISMinfo\command]
    @="powershell -c \"Start-Process cmd -ArgumentList '/c dism /Get-ImageInfo /ImageFile:\\\"%1\\\" &echo ************************************************************************************************************************ &dism /Get-ImageInfo /ImageFile:\\\"%1\\\" /index:1 &echo. &pause' -verb RunAs\""
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...