71 / scoop-better-shimexe

A better shim.exe file for Scoop.
MIT License
72 stars 29 forks source link

Does not detect that the shim points to a GUI app #4

Closed trajano closed 4 years ago

trajano commented 4 years ago

Because it does not detect that it had started a gui app say PuTTY in my case https://github.com/lukesampson/scoop-extras/issues/2801#issuecomment-527587551 it leaves the window open and if you close the window it also closes the process.

Not sure if it will help but say you get the HANDLE from your CreateProcess perhaps use this method to see if the process is going to use GUI resources to detect if it is going to be a Windowed app or not https://docs.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-getguiresources

71 commented 4 years ago

Did you try to build the exe yourself? The releases page isn't up to date, and fixes for this specific case were pushed since then.

trajano commented 4 years ago

Nope. I don't have a VC++ environment set up. Though perusing the code I am not sure if this will work on non-US machines because of the use of A at the end rather than W but that's another issue which I cannot test at the moment, but I don't want to forget it so I am just writing this down here quickly.

71 commented 4 years ago

That's a good concern I didn't think about. I use Hangul and French characters often and never had a problem until now, but maybe I was merely lucky. I'll compile it and upload it to the releases.

trajano commented 4 years ago

OK let me know I'll do the reshim thingy. I am still in the middle of reinstalling VS since my installation got corrupted.

71 commented 4 years ago

The updated version is now in the releases.

I just tested with non-ASCII characters and there are indeed errors. I can't fix them right now, though.

trajano commented 4 years ago

No worries about the non-ASCII stuff. I don't think we have any that need it yet :)

trajano commented 4 years ago

Just tested now with 1.1 still has the same issue as I had indicated earlier.

My test was to run it like

Win-R then putty mysite

71 commented 4 years ago

c38134eb91945a7af0bad9811d98711dc011eb9b fixes both the non-ASCII stuff and the console window problem. Thanks for your patience!