Skip to content

Commit

Permalink
Fix for auto-start key mismatch with installer, and unmatched install…
Browse files Browse the repository at this point in the history
…er/app version numbers.
  • Loading branch information
danielgjackson committed Dec 9, 2021
1 parent 8580384 commit 4d7b11e
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions toggle.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ extern int _dup2(int fd1, int fd2);

// Defines
#define TITLE TEXT("Toggle Dark/Light Mode")
#define TITLE_SAFE TEXT("Toggle")
#define TITLE_SAFE TEXT("Toggle Dark-Light Mode")
#define HOT_KEY_ID 0x0000
#define WMAPP_NOTIFYCALLBACK (WM_APP + 1)
#define IDM_TOGGLE 101
Expand Down Expand Up @@ -153,7 +153,7 @@ bool AutoStart(bool change, bool startup)
bool retVal = false;
HKEY hKeyMain = HKEY_CURRENT_USER;
TCHAR *subKey = TEXT("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run");
TCHAR *value = TITLE;
TCHAR *value = TITLE_SAFE;

TCHAR szModuleFileName[MAX_PATH];
GetModuleFileName(NULL, szModuleFileName, sizeof(szModuleFileName) / sizeof(szModuleFileName[0]));
Expand Down
2 changes: 1 addition & 1 deletion toggle.rc
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ MAINICON ICON "icon.ico"
#define STRINGIZE(x) STRINGIZE_HELPER(x)
#define VER_MAJOR 1
#define VER_MINOR 0
#define VER_BUILD 0 // Patch ('build' in MS version order)
#define VER_BUILD 5 // Patch ('build' in MS version order)
#define VER_REVISION 0 // Build ('revision' in MS version order)
#define VER_STRING STRINGIZE(VER_MAJOR) "." STRINGIZE(VER_MINOR) "." STRINGIZE(VER_BUILD) "." STRINGIZE(VER_REVISION)

Expand Down
2 changes: 1 addition & 1 deletion toggle.wxs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Change the Product/@Id on any installation file changes. Modify the Product Version for any minor changes. -->
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi" xmlns:util="http://schemas.microsoft.com/wix/UtilExtension">
<Product Name="Toggle Dark-Light Mode" Id="*" UpgradeCode="9bf9dd6a-aced-4905-98db-3572c6699b8d" Language="1033" Version="1.0.3.0" Manufacturer="danielgjackson">
<Product Name="Toggle Dark-Light Mode" Id="*" UpgradeCode="9bf9dd6a-aced-4905-98db-3572c6699b8d" Language="1033" Version="1.0.5.0" Manufacturer="danielgjackson">
<Package Id="*" InstallerVersion="200" Compressed="yes" InstallScope="perUser" /><!-- "perMachine" / "perUser" -->

<MajorUpgrade AllowDowngrades="yes" /><!-- AllowSameVersionUpgrades="yes" -->
Expand Down

0 comments on commit 4d7b11e

Please sign in to comment.