SnippingTool.exe not located where it appears to be?

1

I just bought a new SteelSeries mouse. I'm trying program button 6 to launch "SnippingTool.exe".

SnippingTool.exe appears to be located at "C:\windows\system32\SnippingTool.exe" or at least it shows up in Windows Explorer that way.

However, in the file picker for SteelSeries Engine 3, that folder does not contain any such file.

enter image description here

Furthermore, the "Everything" app that indexes the NTFS file system shows only two SnippingTool.exe files, and neither are in C:\windows\system32. Instead, it appears to be located at "C:\Windows\WinSxS\amd64_microsoft-windows-snippingtool-app_31bf3856ad364e35_10.0.17134.1_none_7f448e86f2cd59cc\SnippingTool.exe" as well as a subfolder of "C:\Windows\SoftwareDistribution\Download\". The software distribution folder is probably for temporary files, so I'm guessing that the file in the WinSxS (Windows Side by Side) folder is the one that's actually launched.

It gets even more bizzare. If I launch SnippingTool.exe from the start menu or system32 location and look at it's file system location in TaskManager details, it shows "c:\windows\system32". Meanwhile, if I assign button 6 to the WinSxS location, then attempting to launch it via button 6 just focuses on the running instance of SnippingTool.exe, so it seems to think it's the same application. However, if I launch it with button 6 when SnippingTool is not already running, then I just get this blank error dialog, whose icon is the snipping tool's icon:

enter image description here

Can anyone explain this bizarre behavior, or why such a file only appears to be located at "c:\windows\system32"? Based on this information, where is the file really located? I thought it might be a file system symbolic link, but neither cmd.exe or junction64.exe (from Microsoft) indicate it has any such attribute.

Windows seems to be going to a lot of trouble to make me think this file exists at c:\windows\system32 and is not any kind of symbolic link or junction... it shows up there in Explorer in the cmd.exe dir list without any special attributes. However, I can't actually select the file in a file picker, and my "Everything" app that bypasses Windows and parses the NTFS file system says it's not located there. All evidence of the file's actual location seems to contradict what Windows is trying to tell me.

Workaround that provides more insight into the issue

I tried creating a wrapper console application to launch the file at c:\windows\system32\SnippingTool.exe, which was unsuccessful at first. For example, if I build a C# console app that just calls System.Diagnostics.Process.Start("c:\\windows\\system32\\SnippingTool.exe"); it throws an error saying "The system cannot find the file specified at System.Diagnostics.Process.StartWithShellExecuteEx". So that backs up the idea that this file is not actually located where Explorer says it is. Pasting the same path in the WindowsKey+R (run) dialog box works fine. So, somehow Explorer, cmd.exe, Windows Run dialog are all conspiring to act as if this file exists, but any attempt to directly access the file is revealing that it doesn't actually exist.

Rather than launch the file directly, I was able to launch it indirectly without error by passing the path as an argument to explorer.exe like this: System.Diagnostics.Process.Start(new ProcessStartInfo() { UseShellExecute = false, FileName = "c:\\windows\\explorer.exe", Arguments = "c:\\windows\\system32\\SnippingTool.exe" });

Triynko

Posted 2019-08-26T00:07:35.810

Reputation: 2 666

No answers