BOOL bAdminPrivilege = FALSE; TCHAR strUserName[80+1]; DWORD nUserNameLength = 80; GetUserName(strUserName,&nUserNameLength); AfxMessageBox(strUserName);