#include "stdafx.h"
#include <Windows.h>
#include <WinBase.h>
int _tmain(int argc, _TCHAR* argv[])
{
char testdata[1024];
char name[] = "TestVarXX";
BOOL result;
HANDLE handle = NULL;
TOKEN_PRIVILEGES tp;
ZeroMemory(&tp, sizeof(tp));
if (!OpenProcessToken(GetCurrentProcess(), TOKEN_QUERY | TOKEN_ADJUST_PRIVILEGES, &handle))
printf("Failed to open process\n");
if (!LookupPrivilegeValue(NULL, SE_SYSTEM_ENVIRONMENT_NAME, &tp.Privileges[0].Luid))