@mikeyww
Yes I tested your script with no changes to it, by running it directly (double click in File explorer) I had to anyways, since the active window was hard coded to be explorer. None of the involved processes were elevated either.
>Explorer.exe alone can have multiple matches. You would typically want to refer to the window class in referring to File Explorer.
Ahhhh! that was it...I can confirm that indeed I was targeting the wrong explorer process. When a chose a more specific window title to get the window ID it worked:
But I am plagued by this "catastrophic failure" issue anyways. As you can see in the above console output there are a lot of errors output before the file paths are returned. Running the script within VsCode, makes it possible to at least get selected file paths.
Running the script directly by printing the file path on a message box, I get a lot of errors that I have to "ok" before I finally get the path:
@JoeWinograd
>If you used the exact code that mikey and/or I posted, my guess is that your call to the function is bad
Yes I used both functions exactly as provided with no changes to them, I merely changed how they were being called by opting to print the output to the VsCode console rather than a message box, but I recorded the above gif to also demonstrate the issue with a message box.
>I doubt that this is a Microsoft issue. It's certainly possible, but far more likely, imo, that your code (not Windows and not the mikey/teadrinker or sinkfaze code) is the culprit.
I am woefully out of my depth here, its of some comfort to me to add to the false accusations laid bare at Microsoft
![Very Happy :D](./images/smilies/icon_e_biggrin.gif)
but I figured it out eventually thanks to you and mikey. Much appreciated.