Since the release of Win Vista, Microsoft introduced file virtualization for legacy applications running as 32bit processes. Released as part of Microsoft\'s User Account Co
Sounds like you're trying to flag if you are "running" from the local app data path, in which case:
var currentPath = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
var appDataPath = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData);
Console.WriteLine(
"Current path is:{0}, AppData Path is {1}, Current is subpath of appdata path:{2}",
currentPath,
appDataPath,
currentPath.StartsWith(appDataPath)
);