Skip to content

Commit 344ed73

Browse files
Add exe manifest to enforce UAC permissions
1 parent 0042427 commit 344ed73

File tree

2 files changed

+32
-4
lines changed

2 files changed

+32
-4
lines changed

CEdev/lib/src/setup/setup.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ int main () {
3131

3232
wcscpy(toolchain_bin_w, toolchain_path_w);
3333
wcscat(toolchain_bin_w, L"\\bin");
34-
printf("CEDEV Varible: %ls\n", toolchain_path_w);
35-
printf("PATH Variable: %ls\n", toolchain_bin_w);
34+
printf("CEDEV Variable: %ls\n", toolchain_path_w);
35+
printf("PATH Variable: %ls\n", toolchain_bin_w);
3636

3737
// Get the current key value if it exists
3838
if (RegOpenKeyW(HKEY_CURRENT_USER, L"Environment", &hkey) != ERROR_SUCCESS) {
@@ -97,7 +97,7 @@ int main () {
9797
}
9898

9999
RegCloseKey(hkey);
100-
std::cout << std::endl << "Success!";
100+
printf("\nSuccess! You can now delete setup_win.exe if you wish");
101101
waitForUser();
102102
return 0;
103103

@@ -108,6 +108,6 @@ int main () {
108108
}
109109

110110
void waitForUser(void) {
111-
std::cout << std::endl << "Press [Enter] to exit...";
111+
printf("\nPress [Enter] to exit...");
112112
std::cin.ignore();
113113
}
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
2+
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
3+
<description>setup_win</description>
4+
<assemblyIdentity version="1.0.0.0" name="setup_win"/>
5+
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
6+
<security>
7+
<requestedPrivileges>
8+
<requestedExecutionLevel
9+
level="requireAdministrator"
10+
uiAccess="false"/>
11+
</requestedPrivileges>
12+
</security>
13+
</trustInfo>
14+
<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
15+
<application>
16+
<!--The ID below indicates application support for Windows Vista -->
17+
<supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}"/>
18+
<!--The ID below indicates application support for Windows 7 -->
19+
<supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}"/>
20+
<!--The ID below indicates application support for Windows 8 -->
21+
<supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}"/>
22+
<!--The ID below indicates application support for Windows 8.1 -->
23+
<supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}"/>
24+
<!--The ID below indicates application support for Windows 10 -->
25+
<supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}"/>
26+
</application>
27+
</compatibility>
28+
</assembly>

0 commit comments

Comments
 (0)