rcmaehl / WhyNotWin11

Detection Script to help identify why your PC is not Windows 11 Release Ready. Now Supporting Update Checks!
https://whynotwin11.org
GNU Lesser General Public License v3.0
6.09k stars 416 forks source link

Unable to Detect "DirectX + WDDM2" in WinPE (which causes exports to not be made) #594

Closed PicoMitchell closed 3 years ago

PicoMitchell commented 3 years ago

Once Windows 11 is released, I would like to be able to run WhyNotWin11 in WinPE during our refurbishment process to determine if a computer should get the Windows 11 WIM image or the Windows 10 WIM image installed onto it.

WhyNotWin11 appears to run fine in WinPE, but is not able to determine "DirectX + WDDM2". I'm assuming this is because there are no graphics drivers installed yet. That it continues to show "Checking…" for this row in the GUI is not that bad, but I am wanting to run this silently with an export and analyze the export with no user intervention to determine if Windows 11 can be installed.

When I try to do a silent export, nothing ever gets created. I am assuming that this may be because the process is hanging in the background waiting to be able to determine the "DirectX + WDDM2" status. If I check TaskMgr, I can see my multiple WhyNotWin11 executable attempts still running with no exports created after multiple minutes.

I'm thinking it would be useful to add some timeout to this check to give up after some reasonable time (and go ahead and create the export with an "Unknown" value in this field or something so the other fields can be checked). Or if its possible to determine that the drivers aren't installed so the check can't be performed to skip it promptly (that would be even better and faster).

For my usage in WinPE, I am really only wanting to confirm UEFI, CPU, RAM, and TPM. TPM is easy enough to check on my own without using WhyNotWin11, but since the CPU check is more complicated, using WhyNotWin11 would be handy.

WhyNotWin11 is going to fail other checks in WinPE since it's detecting the RAM disk as the boot disk which will fail Disk Partition Type and Storage Available, but that's ok because I know that our actual internal drives will be large enough and I will be formatting them correctly in code. We will also allow Windows 11 installations without Secure Boot enabled since it won't be possible to enable when network booting, but I will add checks in the full OS to force the technician to enable it after the installation is complete.

Thank you so much for WhyNotWin11! I think it's going to be extremely useful for determining Windows 11 compatibility silently and seamlessly before installations in WinPE during our refurbishment process!

micwoj92 commented 3 years ago

Thanks for the detailed report, could you report separate issues separately so it will be easier to track see what's done? For example one issue with "/silent doesn't silent the "not supported" alert when running on Windows 11", second with "add timeout after x seconds", third with "disk check failure when running WinPE" and so on. Thanks in advance.

edit: oh, I see Robert already assigned this, I still think it'd be easier.

PicoMitchell commented 3 years ago

Sorry about the multiple reports in a single issue. I will make another right now for better tracking.

rcmaehl commented 3 years ago

@PicoMitchell Thanks for the feedback, I'll get started on some of these as soon as I can

PicoMitchell commented 3 years ago

@micwoj92 The issue I made about the alerts in silent mode doesn't supercede the primary issue about exports hanging in WinPE because of the lack of graphics drivers though. I was intending this issue to still exist for that primary report.

But if @rcmaehl has it on the TODO list, I don't mind whether this issue itself is open or closed.

Thank you both!

PicoMitchell commented 3 years ago

Thanks for re-opening. I've edited the title to make it more specific to the primary issue and deleted the previous paragraph about https://github.com/rcmaehl/WhyNotWin11/issues/595

micwoj92 commented 3 years ago

Related to #58

rcmaehl commented 3 years ago

Planned Improvements:

PicoMitchell commented 3 years ago

I really like the "Add Command Line Switch to Skip Check (and other checks)" idea! That would be perfect for my use case.

PicoMitchell commented 3 years ago

I had some time to do testing today using the dev build post here https://github.com/rcmaehl/WhyNotWin11/issues/595#issuecomment-915406893

When run in WinPE in GUI mode, I am now seeing "DxDiag Errored" in the "DirectX + WDDM2" line (with an orange question mark box).

If I run an /export in GUI mode, the exported file is created whenever I manually close the GUI window (but not while WhyNotWin11 is still running). In the TXT export, the "DirectX + WDDM2" line show "-1 -1".

If I run an /export in /silent /force mode, the process runs forever (waited much longer than the 2 minute timeout) but no exported is ever created.

With this latest version, I can basically get the behavior I am looking for by launching WhyNotWin11 in GUI mode with /export and then waiting a few seconds and then taskkilling WhyNotWin11. That ends up with a proper export with no user interaction, but I would like /silent mode to just be able to do the export as quickly as this roundabout technique.

I think that the "Add Command Line Switch to Skip Check (and other checks)" will solve my problem so that I can just totally exclude the "DirectX + WDDM2" test and avoid any delay.

rcmaehl commented 3 years ago

Nvm, I've been looking at the wrong spot this entire time. Please try the latest dev build.

https://nightly.link/rcmaehl/WhyNotWin11/workflows/wnw11/main/WNW11.zip

PicoMitchell commented 3 years ago

Sorry to hear this was a pain to track down. But glad to hear you found it! I'll try out the new build today!

PicoMitchell commented 3 years ago

Sorry I didn't get a chance to do this testing yesterday. I just tested the latest nightly build in Win 10 WinPE (not Win 11 like some prior tests) and /silent /export fully worked! The "DirectX + WDDM2" line in the TXT export showed "false 0 1" and the CSV export just shows false for that field.

This is great! This export should now be totally usable for my pre-install checking in WinPE, thank you so much!

rcmaehl commented 3 years ago

Sorry I didn't get a chance to do this testing yesterday. I just tested the latest nightly build in Win 10 WinPE (not Win 11 like some prior tests) and /silent /export fully worked! The "DirectX + WDDM2" line in the TXT export showed "false 0 1" and the CSV export just shows false for that field.

This is great! This export should now be totally usable for my pre-install checking in WinPE, thank you so much!

I'll leave the 2 issues open until the end of the week in case there's any additional issues but glad to hear!