This repository was archived by the owner on Dec 6, 2022. It is now read-only.
Repository navigation
Fix for 'Cannot acquire Chrome process id' error in VS 15.7 - #665
Merged
Merged
Conversation
Chance An (changsi-an)
approved these changes
May 14, 2018
|
|
||
| if (objShellWindows.count === 0) { | ||
| // If no File Explorer windows are open fall-back to this alternative way of executing the command | ||
| var item = objShellWindows.FindWindowSW(0, 0, /*SWC_DESKTOP*/8, 0, /*SWFO_NEEDDISPATCH*/1); |
Contributor
There was a problem hiding this comment.
How come some of the parameters deserve an annotation, but the rest not?
Maybe this link would help adding annotations for all of them.
Contributor
Author
There was a problem hiding this comment.
Added /NULL/ to the null parameters
added 2 commits
May 14, 2018 15:23
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Line 13 fix is because some users have a - in their username, and the tempFile ended up being C:\Users\some-username\ and wmic failed with invalid path without the quotes
Line 29 fallback is because objShellWindows.count on line 19 is the number of File Explorer windows currently open. If the user doesn't have any File Explorer windows currently open that number is 0, and that logic fails.
In the future we'll remove the objShellWindows.count logic altogether and use the new objShellWindows.FindWindowSW instead. To try to minimize the chances of breaking anything for this fix we are going to leave the existing way as the default and fall-back to the new way if the old way fails.