Skip to content

Commit

Permalink
Merge pull request #2 from BrandonXLF/reg-fix
Browse files Browse the repository at this point in the history
Fixes issue with saving user settings
  • Loading branch information
BrandonXLF authored Feb 23, 2023
2 parents 2f258bf + 48c148e commit 38ce0ee
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Compactor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ int APIENTRY wWinMain(_In_ HINSTANCE hInstance, _In_opt_ HINSTANCE hPrevInstance
return 0;
}

RegOpenKeyEx(HKEY_CURRENT_USER, L"SOFTWARE\\Compactor", 0, KEY_READ | KEY_WRITE, &hKey);
RegCreateKeyEx(HKEY_CURRENT_USER, L"SOFTWARE\\Compactor", NULL, NULL, NULL, KEY_READ | KEY_WRITE, NULL, &hKey, NULL);
hideWhenEmpty = RegQueryValueEx(hKey, L"HideEmpty", NULL, NULL, NULL, NULL) == ERROR_SUCCESS;

HMODULE shell32 = LoadLibrary(L"SHELL32.dll");
Expand Down
8 changes: 4 additions & 4 deletions Compactor.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -29,26 +29,26 @@
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
<PlatformToolset>v143</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
<PlatformToolset>v143</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
<PlatformToolset>v143</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
<PlatformToolset>v143</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
Expand Down
1 change: 1 addition & 0 deletions NSIS.nsi
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ Section "Uninstall"
Delete "$DESKTOP\${APP_NAME}.lnk"
RMDir $INSTDIR
DeleteRegKey SHCTX "${REG_KEY}"
DeleteRegKey HKCU "Software\Compactor"
SectionEnd

!insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
Expand Down

0 comments on commit 38ce0ee

Please sign in to comment.