Skip to content

Commit

Permalink
Merge pull request #41 from berendeanicolae/master
Browse files Browse the repository at this point in the history
fix #40 - handle registry function return value, regression from v3.0.0
  • Loading branch information
hfiref0x authored Dec 11, 2018
2 parents 62a42eb + ecbf953 commit b33b5dc
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions Source/Akagi/methods/explife.c
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ BOOL ucmUninstallLauncherMethod(
HRESULT hr_init;
SIZE_T cbData;
HKEY hKey = NULL;
LRESULT lResult;
GUID guid;
WCHAR szKeyName[MAX_PATH], szGuid[64];

Expand All @@ -85,7 +86,7 @@ BOOL ucmUninstallLauncherMethod(
if (StringFromGUID2(&guid, szGuid, sizeof(szGuid) / sizeof(WCHAR))) {

_strcat(szKeyName, szGuid);
if (RegCreateKeyEx(
lResult = RegCreateKeyEx(
HKEY_CURRENT_USER,
szKeyName,
0,
Expand All @@ -94,16 +95,20 @@ BOOL ucmUninstallLauncherMethod(
MAXIMUM_ALLOWED,
NULL,
&hKey,
NULL))
NULL);

if (lResult == ERROR_SUCCESS)
{
cbData = (1 + _strlen(lpszExecutable)) * sizeof(WCHAR);
if (RegSetValueEx(
lResult = RegSetValueEx(
hKey,
T_UNINSTALL_STRING,
0,
REG_SZ,
(BYTE*)lpszExecutable,
(DWORD)cbData))
(DWORD)cbData);

if (lResult == ERROR_SUCCESS)
{
bResult = ucmMasqueradedAPRLaunchFile(szGuid);
}
Expand Down

0 comments on commit b33b5dc

Please sign in to comment.