Skip to content
This repository was archived by the owner on Dec 6, 2022. It is now read-only.

Fix for 'Cannot acquire Chrome process id' error in VS 15.7 - #665

Merged
roblourens merged 3 commits into
microsoft:VS/15.7from
digeff:d157fix
May 14, 2018
Merged

roblourens merged 3 commits into
microsoft:VS/15.7from
digeff:d157fix

Conversation

@digeff

@digeff digeff commented May 14, 2018

Copy link
Copy Markdown
Contributor

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.

Comment thread src/launchUnelevated.js Outdated

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);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How come some of the parameters deserve an annotation, but the rest not?

Maybe this link would help adding annotations for all of them.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added /NULL/ to the null parameters

@roblourens
roblourens merged commit 9599632 into microsoft:VS/15.7 May 14, 2018
@roblourens roblourens added this to the May 2018 milestone Jun 1, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants