Closed zathorian closed 5 years ago
Thanx Zathorian
CLI mode has largely been untested in WinPE.
I agree, most likely a threading issue (the spinner should not be visible in CLI mode at all.)
I will look into this and report back.
Thanx for your feedback.
Thanks, looking forward! If you need me to test anything or to provide mor information, I am happy to help.
Btw my text was mistakable. I do see the spinner only in Windows PE and only in GUI mode. The CLI mode is without any GUI element as it should be. However in Windows 10 I do not get the spinner in GUI mode which has lead to my assumption that maybe that delay with the spinner is causing the threading/timing issue.
Thanks for the new version. I tested it in Windows PE with these results:
Thanx for this, much appreciated.
I don't have a working WinPE test environment yet. I just did some code clean-up (switching GUI dependencies etc) - I will let you know when I get it working my side ;)
Cheers.
Ok, thanks again. Not sure if the license does allow to upload a PE ISO here (likely not), so if you need any information how to create a WinPE disk/iso, I am looking forward to provide you those.
One last result from my side before I wait for the new version.
When using WinPE with a hardware which has no OS installed yet (=blank disk - my tests before have always been done with a preinstalled Windows 10) I do get this error in CLI mode:
Interestingly I do get then a file which contains the proper OEM license key! (replaced in the upload by XXXXX)
key.txt
In GUI mode I do get:
@zathorian Thanx, I have set up WinPE - I wanted it as basic as possible ( only cmd, notepad and NetFx) I note saving the text file from the GUI gives a ClassID error - this is related to lack of explorer.exe - I will need to handle that exception - any ideas? Default to X:\ or prompt for manual path?
@bessonniy Thanx, noted.
For me it does not matter really where the GUI file is written to as long as it would work. X:\ would be fine by default, however I do not know if all WinPE editions will mount as X (I assume they should). So maybe use an environment variable like %SystemDrive% or %TEMP% instead. Or maybe better - default to the location the exe is located as the user should always know where that file is as he is calling it. Handle the file save / IO exceptions (e.g. if called from a mapped network share without write access) and use then %TEMP%.
@zathorian
Please test update https://github.com/Superfly-Inc/ShowKeyPlus/releases/tag/ShowKeyPlusWinPE
Thanks and sorry for the late reply. I was afk during the weekend.
I tested the new build with these results (all from within WinPE):
It is making good progress, but it is not there yet. Thanks again! If you need anything else tested, I am glad to help.
Thanx @zathorian
Good to see the initial test went well - I did not code/test for without an installed Windows OS.
TODO:
Per screenshot 1 above
The missing object reference in question is the Offreg.dll - change to only extract when OS present.
I'm winging it here as PE is new to me (not the easiest to debug on, gotta say) - please let me know if I'm missing anything.
Yes, that summarizes it quite well. However here are the points in my words (sorted by priority):
Thanks!
@zathorian
New Beta with some fixes.
Re: CLI file saved as "key.txt" to the full path
The full file path will be shown if it is explicit in the command. Eg. this command... C:>ShowKeyPlus.exe C:\Users\Craig\source\repos\ShowKey\bin\x64\Debug\Key.txt.
returns this... C:>File saved as C:\Users\Craig\source\repos\ShowKey\bin\x64\Debug\Key.txt.
Test results based on the recent version (as always from within WinPE only):
no OS installed, with or without OEM license available, CLI mode: it does work! 👍 If the OEM license is available I do get this as output Auto-discovery did not find any Windows installation OEM information found If the OEM license is not available, that complete block incl. the "OS not found message" is not shown. This is for sure a minor thing.
OS installed, OEM license available, GUI mode: everything does work! 👍
OS installed, OEM license available, CLI mode: output file is written properly, the process does NOT close itself anymore when using "start /wait showkexyplus.exe key.txt" as in the release before. I do have to press "CTRL+C" after "file saved as key.txt" does show up.
no OS installed, no OEM license available, GUI mode:
if I click on "OK" it closes itself (not sure if it should do that, if yes, it does also work).
Bottom line, very good progress.
For me the one remaining priority issue is that it does not close itself anymore if an OS is found in CLI mode. Worst case I would have to write something in my wrapper script that it will be killed after some time but I would like to avoid that if possible.
@zathorian
Thanx for the feedback. Good work ;)
The interaction with Console is problematic as cmd.exe seems to have very set parameters within which it operates, but I want to get that working. As part of the refactoring process I will try some other methods to make it as seamless as possible.
I appreciate your input.
I implemented a powershell wrapper in the way that I do NOT wait till the process closes. instead every now and then I check if the file has been written properly. That way it does work, however it is not ideal. Positive aspect is that this way it is working 100% fine for my use case 👍 currently more extensive tests are running. I do not expect any new issues though. Thanks!
@zathorian
That's excellent!
I will close this as an issue and consider the oustandings as enhancements for a later release.
I usually release a new version with each Windows RTM release - although I don't see any new Windows editions or API breakages we need to cater for in the May 2019 Update...)
Thanx for your support.
Hi,
Thanks for the tool!
When using the tool (recent version) in CLI mode in Windows PE (ADK 1803) it does create the file, however the values are not added (please see attached file key.txt ).
It does show all information when running in GUI mode, however unlike in Windows 10 it needs several seconds to show the values (I do see a spinning circle first which I do not get in Windows 10). Therefore I suspect a timing issue that in CLI mode the file is written too soon.
I do have tried also the older version and either it does not run on PE at all or it has the same behaviour.
Thanks again, Zathorian