Closed randomascii closed 2 years ago
HKLM\SOFTWARE\WOW6432Node\Microsoft\Microsoft SDKs\Windows\v8.1 and HKLM\SOFTWARE\WOW6432Node\Microsoft\Microsoft SDKs\Windows\v10.0 both have InstallationFolder values. They point to the directories that contain the Windows Performance Toolkit directory (including for one of my coworkers that encountered this issue).
However, there's another tool that may install WPT, right? That's not the SDK or the extracted MSI's? I would need to check if that tool does the same installation.
What is your preferred behavior if the registry locations don't exist? Fallback to the current "assume in Program Files"?
I'm not aware of a way to install WPT other than the SDK or the redist MSIs, although there could be such a thing. Falling back to the current behavior is probably fine if the registry keys don't exist or if xperf.exe can't be found.
I think there is also a problem on first-use of UIforETW where if it installs WPT and then tries to launch it then xperf.exe may not be found because it is added to the path too late. I have not seen this for a while. It resolves on relaunch of UIforETW.
Is this still an issue? Can I close this?
FWIW I still had this issue even when setting the registry key and ended up using an NTFS junction to get it to work.
I'm not aware of a way to install WPT other than the SDK or the redist MSIs
You can also install it from the Microsoft Store, but I'm not sure if it's been maintained: https://www.microsoft.com/en-us/p/windows-performance-analyzer/9n0w1b2bxgnz?activetab=pivot:overviewtab
Detecting the app can be accomplished with something like GetPackagesByPackageFamily
, and launching the app can be done with IApplicationActivationManager::ActivateApplication
. Powershell's Get-AppxPackage
is also useful for stumbling around and exploring this area.
@eugeneia - can you debug why the fixes didn't work? It would be nice to understand what went wrong so that we can fix the code.
Off-topic, but I inquired about the Microsoft store version. It is currently behind the SDK version but should be catching up soon, and then it might move ahead. Having an option to detect and use it would be nice.
Would someone like to create a PR for the issues raised in the previous comment? I don't have a setup to test this easily so I'm not sure when I'll get around to it.
FYI I compiled UIforETW and walked through this with a debugger, so this is verified. Also, looking at wine's implementation gives even more confidence :)
I think this is fixed now - path support allows fixing quite easily. Reopen if there are still issues.
Some developers install WPT on drives other than C:. UIforETW either needs a way for the user to specify the location or it needs to automatically find the install location, perhaps by searching the PATH environment variable?