Can you write a code to get the Wifi password of the system on Winpe?
This may be a little difficult. Besides, this function is rarely used. It seems that you can use the registry to view it. You can search the search engine in your country for how to view the network password through the registry. The specific content is on this site https://pecmd.net/thread-68.htm How to offline mount the system registry, I hope it can help you.
Unfortunately, I don't know the process of obtaining the WIFI password of the local system, so I can't help you.