Files
2025-03-02 04:57:27 +00:00

20 lines
452 B
C++

// trustinstaller_utils.h
#pragma once
#include <iostream>
#include <codecvt>
#include <Windows.h>
#include <TlHelp32.h>
#include <string>
#include <stdexcept>
class Elevate {
public:
static void RunAsTrustedInstaller();
private:
static void EnablePrivilege(std::wstring privilegeName);
static DWORD GetProcessIdByName(std::wstring processName);
static void ImpersonateSystem();
static int StartTrustedInstallerService();
};