Test
This commit is contained in:
12
launcher/SelfElevate.c
Normal file
12
launcher/SelfElevate.c
Normal file
@@ -0,0 +1,12 @@
|
||||
#include "SelfElevate.h"
|
||||
#include <windows.h>
|
||||
#include "Exec.h"
|
||||
#include "VersionInfo.h"
|
||||
|
||||
HRESULT SelfElevate(LPWSTR args, LPDWORD code) {
|
||||
LPWSTR fileName;
|
||||
GetOwnFileName(&fileName);
|
||||
HRESULT hr = Exec(L"runas", fileName, args, NULL, SW_SHOWDEFAULT, TRUE, code);
|
||||
LocalFree(fileName);
|
||||
return hr;
|
||||
}
|
Reference in New Issue
Block a user