Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Shim console window stays open when launching from Start Menu search #2332

Closed
dirvo opened this issue Jun 26, 2018 · 3 comments
Closed

Shim console window stays open when launching from Start Menu search #2332

dirvo opened this issue Jun 26, 2018 · 3 comments

Comments

@dirvo
Copy link

dirvo commented Jun 26, 2018

When running an installed app via the generated shim exe, a console window stays open in the background. I'd expect that window to not be shown or to be closed immediately after the application is launched.

Steps for reproducing:

  • Install an app via scoop, e.g. I installed git and ilspy in the global scope
  • In the Windows 10 start menu, type, e.g. "git-bash" or "ilspy" to search for the name of the shim. The search finds a matching result with the shim icon, showing the text "Run command" below the command name.
  • Select the search result and press Enter
  • A console window with the full path to the shim exe is opened in the background, then the actually launched application appears on top.
  • The console window stays open in the background

Notes:

  • Another way to repro is to double-click on the shim exe in the scoop\shims folder
  • It works as expected if you run the shim exe via Windows > Run (Win+R) or launch the shim from a cmd prompt.
@dirvo
Copy link
Author

dirvo commented Jun 26, 2018

Probably related to this line? Maybe needs to be conditional depending on whether run from a console or not?

https://github.com/lukesampson/scoop/blob/5942774ae5011f65a10c0804f9d9ee41675afc0b/supporting/shimexe/shim.cs#L122

        WaitForSingleObject(pi.hProcess, INFINITE);

@r15ch13
Copy link
Member

r15ch13 commented Jun 26, 2018

Is this related to #1606?

@dirvo
Copy link
Author

dirvo commented Jun 26, 2018

Yes, this indeed a dupe of #1606 (didn't find that issue using the search, sorry).

@dirvo dirvo closed this as completed Jun 26, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants