Will always return Admin on 9x systems with advapi32.dll that contains functions it shouldn't (all of them?)

git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@2414 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
kichik 2003-04-03 12:26:33 +00:00
parent 27e1a43b4a
commit 442b19bc1f
2 changed files with 6 additions and 1 deletions

View file

@ -32,9 +32,14 @@ void __declspec(dllexport) GetAccountType(HWND hwndParent, int string_size,
char *group = "";
if (GetVersion() & 0x80000000) // Not NT
{
group = "Admin";
}
// First we must open a handle to the access token for this thread.
if (OpenThreadToken(GetCurrentThread(), TOKEN_QUERY, FALSE, &hThread) ||
else if (OpenThreadToken(GetCurrentThread(), TOKEN_QUERY, FALSE, &hThread) ||
OpenProcessToken(GetCurrentProcess(), TOKEN_QUERY, &hThread))
{
// Then we must query the size of the group information associated with