CodingWonders / DISMTools

The connected place for Windows system administration
GNU General Public License v3.0
331 stars 12 forks source link

Alternate DISM path exception (Part 2) #121

Closed AnubyteCode closed 4 months ago

AnubyteCode commented 4 months ago

What is the bug about? Custom DISM version files exception

How does it happen? Looks like there is more to the matter than where the dism.exe and and dismapi.dll files are. Other files are causing errors, too.

Additional context It accepts some of the .sys and .dll files in DT\DISM\DISM: UnionFS.dll and UnionFSApi.dll, just not UnionFS.hiv. Oddly enough it also accepts dism.exe and dismapi.dll in DT\DISM\DISM. A blocked .exe, esddecrypt, is not an official Microsoft DISM .exe. Meanwhile, another unofficial .exe, PSFExtractor.exe, is accepted as a component. Any blocked file is handled fine if placed in the directory of dism.exe and dismapi.dll, DT\DISM.

Blocked files: `Mode LastWriteTime Length Name


-a--- 4/1/2024 8:41 PM 27404 Dism.Format.ps1xml -a--- 4/1/2024 8:41 PM 3318 Dism.psd1 -a--- 4/1/2024 8:41 PM 15380 Dism.psm1 -a--- 4/1/2024 8:41 PM 20378 Dism.Types.ps1xml -a--- 4/1/2024 8:43 PM 1720320 efisys_noprompt.bin -a--- 4/1/2024 8:43 PM 1720320 efisys.bin -a--- 4/30/2024 7:39 AM 66560 esddecrypt.exe -a--- 4/1/2024 8:41 PM 4096 etfsboot.com -a--- 4/1/2024 8:41 PM 8192 UnionFS.hiv -a--- 4/1/2024 1:22 AM 2428 WimBootCompress.ini -a--- 4/1/2024 8:41 PM 8192 wimmount.hiv -a--- 4/1/2024 8:41 PM 8192 WofAdk.hiv`

Accepted files, all list as components (other than the folders): `Mode LastWriteTime Length Name


d---- 5/4/2024 1:36 AM en d---- 5/4/2024 1:36 AM en-us -a--- 4/1/2024 1:22 AM 406944 AppxAllUserStore.dll -a--- 4/1/2024 1:22 AM 701856 AppxProvider.dll -a--- 4/1/2024 1:22 AM 144696 AssocProvider.dll -a--- 4/1/2024 1:22 AM 386352 CbmrProvider.dll -a--- 4/1/2024 1:22 AM 1283376 CbsProvider.dll -a--- 4/1/2024 8:41 PM 320832 cimfs.dll -a--- 4/1/2024 8:41 PM 279872 cimfs.sys -a--- 4/1/2024 8:41 PM 329272 Dism.exe -a--- 4/1/2024 8:41 PM 1201720 DismApi.dll -a--- 4/1/2024 1:22 AM 476464 DismCore.dll -a--- 4/1/2024 1:22 AM 230704 DismCorePS.dll -a--- 4/1/2024 1:22 AM 173376 DismHost.exe -a--- 4/1/2024 1:22 AM 300352 DismProv.dll -a--- 4/1/2024 1:22 AM 435504 DmiProvider.dll -a--- 3/31/2009 10:29 AM 15360 dvdburn.exe -a--- 4/1/2024 1:22 AM 226608 EdgeProvider.dll -a--- 4/1/2024 8:40 PM 943104 esdtoolcore.exe -a--- 4/1/2024 1:22 AM 701872 FfuProvider.dll -a--- 4/1/2024 1:22 AM 95552 FolderProvider.dll -a--- 4/1/2024 1:22 AM 185664 GenericProvider.dll -a--- 4/1/2024 1:22 AM 91456 IBSProvider.dll -a--- 4/1/2024 8:41 PM 931256 imagex.exe -a--- 4/1/2024 1:22 AM 247104 ImagingProvider.dll -a--- 4/1/2024 1:22 AM 333120 IntlProvider.dll -a--- 4/1/2024 1:22 AM 120240 LogProvider.dll -a--- 4/1/2024 1:22 AM 146944 Microsoft.Dism.PowerShell.dll -a--- 4/1/2024 1:22 AM 226624 MsiProvider.dll -a--- 4/1/2024 1:22 AM 230704 OfflineSetupProvider.dll -a--- 4/1/2024 8:41 PM 153128 oscdimg.exe -a--- 4/1/2024 1:22 AM 185648 OSProvider.dll -a--- 4/1/2024 8:41 PM 308664 PkgMgr.exe -a--- 4/1/2024 1:22 AM 873792 ProvProvider.dll -a--- 4/30/2024 7:42 AM 12800 PSFEx.exe -a--- 4/1/2024 1:22 AM 198064 SetupPlatformProvider.dll -a--- 4/1/2024 8:41 PM 140856 siloedpackageprovider.dll -a--- 4/1/2024 1:22 AM 349504 SmiProvider.dll -a--- 4/1/2024 8:41 PM 165416 SSShim.dll -a--- 4/1/2024 1:22 AM 808240 SysprepProvider.dll -a--- 4/1/2024 1:22 AM 1500464 TransmogProvider.dll -a--- 4/1/2024 1:22 AM 826792 ucrtbase_clr0400.dll -a--- 4/1/2024 1:22 AM 641968 ucrtbase_enclave.dll -a--- 4/1/2024 1:22 AM 1369088 ucrtbase.dll -a--- 4/1/2024 1:22 AM 292160 UnattendProvider.dll -a--- 4/1/2024 8:41 PM 492864 UnionFS.sys -a--- 4/1/2024 8:41 PM 263488 UnionFSApi.dll -a--- 4/1/2024 1:22 AM 599360 VhdProvider.dll -a--- 4/1/2024 1:22 AM 283952 wdscore.dll -a--- 4/1/2024 8:41 PM 910888 wimgapi.dll -a--- 4/1/2024 8:41 PM 75056 wimmount.sys -a--- 4/1/2024 8:41 PM 95552 WimMountAdkSetupAmd64.exe -a--- 4/1/2024 1:22 AM 697648 WimProvider.dll -a--- 4/1/2024 8:41 PM 648632 wimserv.exe -a--- 4/1/2024 8:41 PM 271776 wofadk.sys`

Exception: _System.NullReferenceException: Object reference not set to an instance of an object. at DISMTools.DismComponents.DismComponentsLoad(Object sender, EventArgs e) at System.Windows.Forms.Form.OnLoad(EventArgs e) at System.Windows.Forms.Form.OnCreateControl() at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible) at System.Windows.Forms.Control.CreateControl() at System.Windows.Forms.Control.WmShowWindow(Message& m) at System.Windows.Forms.Control.WndProc(Message& m) at System.Windows.Forms.Form.WmShowWindow(Message& m) at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam) Error Message: Object reference not set to an instance of an object. Error Code (HRESULT): -2147467261

CodingWonders commented 4 months ago

This is because it does simple file iteration. I've added a try-catch block that should appear in the latest nightly installer. Please let me know of any other issues you may encounter here.

CodingWonders commented 4 months ago

@AnubyteCode, by file iteration I mean that the program simply goes through all files in the DISM components directory. This is normal for the system DISM executable, but can get additional files if the DISM path is something different

AnubyteCode commented 4 months ago

Thanks, will do. I'm a bit new to this world but it's a good time to start. I'll try not to clutter with noobing.

By the way, I'm the guy who talked about the S added. I know I said I had nothing to do now, but then I thought about it, and figured I wanted to help. Probably won't do be able to do anything fancy for now, but I'll bug report and suggest QoL features.

CodingWonders commented 4 months ago

@AnubyteCode, I remember that. I still think it is a coincidence! But anyway, feel free to report any feedback. It is very appreciated. Plus, you will appear in the release notes of a new version!

CodingWonders commented 4 months ago

I'm closing this issue, as you should no longer face any exceptions regarding the DISM components dialog. Feel free to create a new one if you experience more problems