This project has moved and is read-only. For the latest updates, please go here.

CLRProfiler complains you should copy to Program Files / Program Files (x86)

Nov 20, 2012 at 5:38 PM

Hi, everyone.

One user with German Windows 8 had issues with profiling Windows Store apps, where CLRProfiler would display a message asking him to copy files to Program Files / Program Files (x86) even if they were already there.  This message will be displayed if the OS does not grant ALL APPLICATION PACKAGES read & execute permissions for the CLRProfiler binaries (the decision to show the message is not actually based on the name of the parent subdirectory).  The easiest fix for this is to copy the binaries under the system-provided Program Files / Program Files (x86) directories, since they already have those permissions set for all their contents and subdirectories.  I expect these directory names are localized for the particular language of your Windows 8, though I don't have a German Windows 8 handy to double-check.

Note that creating your own directories with these names will not work, as it's the permissions that matter, not the name.  The binaries really can be placed anywhere, so long as those permissions are set.  So if any of you have this issue, please examine your permissions.


Nov 20, 2012 at 7:24 PM

Hi David,

Congrats for CLRProfiler 4.5 release! I saw your recent answer in one of my old posts ( and I am very happy to see that MSFT is going to release whitepaper on the topic.


@ConfusedGuy, I had a glance at the CLRProfiler 4.5 source code and I have a guess what might cause the problem. See the following line in WindowsStoreAppHelper.cs file.

NTAccount appPackageId = new NTAccount("ALL APPLICATION PACKAGES");

I guess the string "ALL APPLICATION PACKAGES" is localized in German Windows 8. I would recommend using System.Security.Principal.SecurityIdentifier together with "S-1-15-2-1" SID. Actually, this is how I implemented it in JustTrace. This is very well documented here

Please let me know if this works for you.



Nov 20, 2012 at 7:30 PM

Hi, Mihail.

Excellent point, thanks very much for your post!  When I have some time, I'll give this a try.  If that's indeed the issue, it will be fixed in the next update.


Nov 21, 2012 at 3:26 PM

Thanks for that.

 And that was the problem. The NTAccount is localized and thus the compare doesn't work.

so i replaced it with

SecurityIdentifier appPackageId = new SecurityIdentifier("S-1-15-2-1");
//to get the name for the compare..
string accountName = appPackageRule.IdentityReference.Translate(typeof(NTAccount)).ToString();

 and that worked :-)

so thank you guys for the fast help.