How long does it take to run dir /b /s %LocalAppData% chrome.exe?
Sorry, I'm on a different computer again, I use Firefox here on a fairly fresh install of Windows 8, and it's an SSD, so it's a lot quicker, but I did try what you said earlier for chrome.exe on the other computer earlier and it took about 5 seconds, but Windows will cache the results of dir if you've ran it recently, so if I restarted my PC it probably would've taken longer.
Edit: I'm also avoiding the registry because I'm not sure reg will actually work when people are running as non-administrators on a wonky group policy. If your testing reveals that adding a filename doesn't help the search time at all, I'll probably wind up doing both, but if specifying the filename you're looking for reduces your dir /s time substantially as it does for me (my tests were on the C drive, but admittedly I've got nothing on this Windows VM so it was two seconds vs. fractions of a second), I don't really want to add in that complexity if I don't have to.
reg will exit gracefully if it doesn't have the correct permissions, but most users will at
least have access to those hives or they'd have a lot of trouble even logging in (and HKEY_CURRENT_USER by default belongs to the current user).
Edit 2: reg query doesn't return any data for Chrome or Firefox for me on my Windows XP VM, so the fact that the Run dialog works is probably Microsoft's fallback logic that searches the Start Menu. I'll see if I can't find a way to do search against the lnk files in the Start Menu instead of doing this registry search.
The reg query method won't work for Chrome unless you set it as the default browser at installation time, in the suggestion I posted the search for Google Chrome should work quite nicely though. I'm a little surprised it doesn't work for Firefox, but perhaps there is a better registry key to be reading from. Your idea about searching through the start menu is also not a bad one, this is how Windows 8 determines what to applications to add to the home screen.
A problem which I had thought of but couldn't confirm until now is that dir will traverse symbolic links in NTFS. If you have a looping directory tree (as exists in WinSxS systems) due to symbolic links, dir will loop continuously and eventually stop producing output because every path becomes too long to even print, but dir will never actually return unless you manually terminate the operation.
Here's an example of what happened on my machine when traversing ProgramData.
Code:
The directory name F:\ProgramData\Application Data\Application Data\Application
Data\Application Data\Application Data\Application Data\Application Data\Applica
tion Data\Microsoft\Windows\WER\ReportArchive\NonCritical_7.8.9200.16384_7c7469d
2abbd78725d0bec58da07bcd9c4fb9a_0a104a73 is too long.