Added "ALLUSERSPROFILE" Startup path in check.

git-svn-id: http://svn.code.sf.net/p/greenshot/code/trunk@2269 7dccd23d-a4a3-4e1f-8c07-b4c1b4018ab4
This commit is contained in:
RKrom 2012-11-12 15:30:15 +00:00
commit 101cb27070

View file

@ -224,6 +224,13 @@ namespace Greenshot.Helpers {
return true;
}
}
string startupAll = Environment.GetEnvironmentVariable("ALLUSERSPROFILE") + @"\Microsoft\Windows\Start Menu\Programs\Startup";
if (Directory.Exists(startupAll)) {
LOG.DebugFormat("Startup all path: {0}", startupAll);
if (File.Exists(Path.Combine(startupAll, Path.GetFileNameWithoutExtension(Application.ExecutablePath) + ".lnk"))) {
return true;
}
}
} catch {
}
return false;