project configuration

gui
qtkite 3 years ago
parent af0815ffb2
commit 2c22a6d968

@ -172,8 +172,7 @@ namespace dcontrol
// Start (3 off) (2 on) // Start (3 off) (2 on)
if (reg::create_registry(L"SYSTEM\\CurrentControlSet\\Services\\WinDefend", hkey)) if (reg::create_registry(L"SYSTEM\\CurrentControlSet\\Services\\WinDefend", hkey))
{ {
if (!reg::set_keyval(hkey, L"Start", 3)) reg::set_keyval(hkey, L"Start", 3);
printf("Failed to write to Start\n");
} }
else else
printf("Failed to access CurrentControlSet\n"); printf("Failed to access CurrentControlSet\n");
@ -268,8 +267,7 @@ namespace dcontrol
// Start (3 off) (2 on) // Start (3 off) (2 on)
if (reg::create_registry(L"SYSTEM\\CurrentControlSet\\Services\\WinDefend", hkey)) if (reg::create_registry(L"SYSTEM\\CurrentControlSet\\Services\\WinDefend", hkey))
{ {
if (!reg::set_keyval(hkey, L"Start", 2)) reg::set_keyval(hkey, L"Start", 2);
printf("Failed to write to Start\n");
} }
else else
printf("Failed to access CurrentControlSet\n"); printf("Failed to access CurrentControlSet\n");

@ -48,7 +48,7 @@
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType> <ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries> <UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v143</PlatformToolset> <PlatformToolset>v142</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization> <WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>MultiByte</CharacterSet> <CharacterSet>MultiByte</CharacterSet>
</PropertyGroup> </PropertyGroup>
@ -137,12 +137,13 @@
<PreprocessorDefinitions>NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode> <ConformanceMode>true</ConformanceMode>
<LanguageStandard>stdcpplatest</LanguageStandard> <LanguageStandard>stdcpplatest</LanguageStandard>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
</ClCompile> </ClCompile>
<Link> <Link>
<SubSystem>Console</SubSystem> <SubSystem>Console</SubSystem>
<EnableCOMDATFolding>true</EnableCOMDATFolding> <EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences> <OptimizeReferences>true</OptimizeReferences>
<GenerateDebugInformation>true</GenerateDebugInformation> <GenerateDebugInformation>false</GenerateDebugInformation>
<UACExecutionLevel>RequireAdministrator</UACExecutionLevel> <UACExecutionLevel>RequireAdministrator</UACExecutionLevel>
</Link> </Link>
</ItemDefinitionGroup> </ItemDefinitionGroup>

@ -86,7 +86,7 @@ namespace reg
if (ret) if (ret)
{ {
wprintf(L"Set error: %d\n", ret); // wprintf(L"Set error: %d\n", ret);
return false; return false;
} }
@ -102,7 +102,7 @@ namespace reg
if (ret) if (ret)
{ {
wprintf(L"Set error: %d\n", ret); // wprintf(L"Set error: %d\n", ret);
return false; return false;
} }
return true; return true;

@ -6,4 +6,4 @@
#define DEFENDER_DISABLE 2 #define DEFENDER_DISABLE 2
#define DEFENDER_GUI 3 #define DEFENDER_GUI 3
#define DEFENDER_CONFIG DEFENDER_DISABLE #define DEFENDER_CONFIG DEFENDER_ENABLE

Loading…
Cancel
Save