Winpe For Windows 11

1 view
Skip to first unread message

Claude

unread,
Aug 5, 2024, 10:28:13 AM8/5/24
to pahamador
Thatblew up, after adding the files from the most recent mmc KB, diskmgmt.msc, and apphelp.dll. it blew up with a fat "class not registered" error. and any attempts to regsvr32 the dlls excepted with the "no entry point" error.

We are building an extensible menu for deployments from WDS. The user selects a catalog from the treeview, we tell them how many indexes there are, then throw the GUI for them to partition the drive (currently it is behind the scenes, and can only handle a single drive, dividing it evenly based off the number of indexes. And if the # of drives = the number of indexes it will do one per). However, when we were thinking through edge cases like, how to adapt for someone that has 2 drives and 5 indexes and only wants 3 of the 5 indexes, we decided its best to just give them a GUI.


You have to add some other files and registry keys in order to get the MMC console and Diskmgmt.msc to load. I have the info in some notes around here somewhere. Soon as I find them I can post the info.


Here is the autoit script I run that add the needed registry entries fro disk management to work in PE 3.0. It also enables or partially enables some of the other MMC consoles. Because of the way I ise PE to deploy images I don't add it directly to PE's registry I just load it at start up via my deployment application.


I believe these are all of the files you need for diskmgmt.msc to work with the above registry entries. Since I was enabling more than one my notes may have an extra file or be missing one, if it doesn't work let me know and I can dig further.


Found everything in a win7 sys32 and added those, the files fixed the error. It is showing the Drives, however the context menus are all blank, and anything i click it returns "windows could not report the error". I also get an error on launch of the GUI saying it cant run on anything prior to internet explorer 5.5...looking at that now


Think I jumped the gun on the context menu stuff, that was all directly related to mmc.exe forcing closed when detecting an ie version of lower than 5.5 (the autoit GUI was doing its damnedest to keep the diskmgmt window painted, and i was doing my best to click on stuff that had already been terminated).


You also need to set values for the following, I did not add them to the above AU3 file in case others reading this already have IE added to their PE build, I do not but you need these values for MMC.exe to run:


I have the exact same probleme as this post, on app execution from command line, it is not showed up any interface and does not display any error message. I also checked running process and there is no one for my application.


On image creation, as expressed on MS site I first imported WinPE-WMI requirement followed by .NET Framework package WinPE-NetFX. Next I created bootable USB stick using built image. I ended by copying the application on additional directory stored on USB.


Try adding HTA and Scripting packages, it does increase the size of your boot.wim but the dependencies are required for certain libraries. Also check that you added the corresponding language packages as well. A tactic that I've used when I first did a .Net application in WinPE is add all the packages and test it in Virtual Box then slowly removed packages I didn't need a see if it worked. I made a batch script to to add all packages and REM out the ones I didn't need. Here's the script if needed


I believe the only requirement for .net is winpe-netfx...but almost everybody doing winpe work needs wmi and scripting, too...just by the nature of what winpe is all about. The remaining .cabs are pretty specific to what I need.


Having said that, there's lots of stuff that doesn't work in winpe forms. "Standard" dialogs (File Open, etc) don't work, for example. It's kinda hit-n-miss. It's possible your main form asks for features not available in winpe.


So, start basic and build up...a form /w single button...get that to deploy...then add things until it breaks. Don't expect to build a sophisticated UI in winpe...it's not gonna let you. Labels, buttons, text boxes, list boxes...and not much more.


Also - be aware that there are deployments for x86 and amd64 (you probably want amd64)...and you have to match the .cabs to the image you start with...and compile your .net program to be either any .cpu or specific to your chosen runtime. If you choose any cpu, turn off "prefer 32 bit" on the build tab.


Something is almost certainly wrong with the RAID/SATA controller or the built in SSD as a sleep operation caused data corruption (overwritten GPT table and many Intel Rapid Storage technology cache issues with a somewhat corrupted MFT). All UEFI diagnostics tests of the latest provided by HP (through a USB drive) are showing PASS. Boot disks work for various tools. But any attempt to bring up Windows or any WinPE (pre-execution environment) always cause a hang with the circle spinning round and around but even capslock not responding. The boot drivers for SATA and RAID almost certainly cause the hang. And considering bootable USB with both UEFI, or CSM legacy Windows or MSDART tools always hang, the issue is certain that something in the hardware failed. I have reflashed the latest BIOS using Crisis method and the normal UEFI way. Tried a hard reset. Is there anyway to diagnose this further without sending to a shop for a repair?


It is a 4 year old HP Envy 15, out of its 3 year care pack warranty, HP is offering nearly $60 for a diagnosis conversation, and who knows how much a repair would cost given I am in Hungary now and the warranty is for the USA. If I can diagnose and find an easy way to repair some component at a local non-official service dealer who can go into the hardware, it might be the only monetarily sound method to proceed beyond scrapping the laptop.


I fortunately can recover most of the disk, though chkdsk repair may destroy a lot of files, and a lot of those files are randomly corrupted due to the way the cache drive failure must have occurred. But the cache drive still shows up in BIOS along with the RAID controller settings and such. Any ideas?


My suspicion is the hang occurs at the very first stage of boot when iastor*.sys driver(s) load, be it a default version, or the Intel Rapid Storage RST one. I dont think a CMOS reset would help here. Perhaps removing the 32GB SSD (if it even is removable) or even making a special non-standard Windows which boots without the default AMD SATA driver. I have heard from repair shops that SATA/RAID controllers failing are pretty rare.


Shrunk the Windows partition to around 185GB by deleting files first, defragmenting (to avoid long boot process and benefit on the SSD) and finally using Easeus. Migrated the OS to the SSD (EFI partition, Windows partition, then a page file partition and finally the Windows recovery partition) while having a data partition and the HP recovery partition on the 1TB drive, the default on new HP laptops. A lot of games with changing the BCD entries.


And Windows boots instantly and the machine is blazing fast, 7 years later, and a lot more stable and reliable without using this old cost cutting caching technology which Intel is starting to phase out based on the price of SSDs.


For some reason the BIOS in the HP Envy 15, does not allow specifying which drive is the UEFI drive. It defaults to Port 0, or the 1TB drive first, then Port 1 or the mSATA SSD. Removing the 1TB hard drive and it boots fine. But with both, I have to still put the EFI partition on the 1TB drive which is annoying. Perhaps removing the GPT table would help it skip Port 0, but right now I am unsure why it gives the no hard drive error getting stuck at Port 0 and not skipping to the next drive, and not providing any BIOS configuration. It was intended to use as a cache drive and HP's bottom line will probably be that.


I suspect using BIOS unlocking tools, and some potentially dangerous reconfigurations in that area this could be fixed, or possibly changing the GPT to an MBR drive might do the same. New laptops have better BIOSes.


It is difficult to diagnose a bad SSD. And a painfully annoying waste of time and money... Anyone with an old laptop with a cache mSATA would be wise to spend the $100 to upgrade it to a respectable 128+GB SSD and boot off it and stop with the caching which can cause a catastrophe and difficult to diagnose problem when the drive blows out (4 and a half years in this case).


Apparently it still booted, but not from media which had Intel RST (Rapid Storage Technology) driver in it. MSDART had the driver added which caused it to be useless in this context. A bit annoying as for an emergency USB, you would need an MSDART with and without Intel RST, along with all media including Windows installation, etc.


4) chkdsk to make sure the MFT is not corrupted, it can be dangerous as certain corruption of the MFT can cause chkdsk to wipe out most of the table and render the system a file level data recovery disaster, so backup of critical data first highly recommended since the nature of a random crash with a cache drive is not always predictable especially if known a lot of write activity was occuring around it.


6) Repair the registry manually by loading the windows\system32\config\SYSTEM registry hive as "sys", iastorav, iastorv, and storahdci must have StartOverride set from 3 to 0. Any remnants of Intel RST iastorac, iastora, etc should be carefully removed and searched for to make sure no dependencies in hardware are still there. Exporting registry from the repair Windows running for the hardware, using notepad to change SYSTEM to "sys", then reimporting while mounted can allow corrupt RST removal in the Enum and Control\DeviceClasses areas without issue but should only be done by someone with expert confidence and experience.


In the end, the Liteon 24gb SSD was faulty. It was causing RST driver to hang. Behavior changed by creating a RAID0 then deleting it (unfortunately blowing the GPT and repeating all above steps). Then using RST in Windows which is painfully slow without it, a cache drive initialized again. Then Windows gave blue screen of INVALID STORE EXCEPTION, which it was doing previously prior to the failure and is a warning sign of the bad SSD.

3a8082e126
Reply all
Reply to author
Forward
0 new messages