XP compatible launcher

Building will have to be sorted but it's a start, please test as I don't
have an XP machine anymore.
This commit is contained in:
Martin Kemp
2014-01-21 18:25:24 +00:00
parent 4120875e33
commit 8303a7acbc
4 changed files with 100 additions and 3 deletions

View File

@ -192,8 +192,13 @@ void UnregisterShellMenu(std::wstring opt)
FAIL_ON_ERROR(
RegCreateKeyEx(root, SHELL_MENU_REGISTRY_PATH, 0, NULL,
REG_OPTION_NON_VOLATILE, KEY_ALL_ACCESS, NULL, &cmderKey, NULL));
#ifdef XP
FAIL_ON_ERROR(SHDeleteKey(cmderKey, NULL));
FAIL_ON_ERROR(SHDeleteKey(root, SHELL_MENU_REGISTRY_PATH));
#else
FAIL_ON_ERROR(RegDeleteTree(cmderKey, NULL));
FAIL_ON_ERROR(RegDeleteKey(root, SHELL_MENU_REGISTRY_PATH));
#endif
RegCloseKey(cmderKey);
RegCloseKey(root);
}