WinHugs installer, create shellcode log
Neil Mitchell <[email protected]>
| Newsgroups | gmane.comp.lang.haskell.cvs.hugs |
|---|---|
| Message-ID | <404396ef0510120431j3270797flf01783bfb75b3ec6__6878.39894458211$1129118488$gmane$org@mail.gmail.com> |
Hi, This patch adds logging for actions created using the shell, namely shortcuts and registry keys. The only remaining patch to the installer will be to create an uninstall entry. After that it will just remain to write an uninstaller :) Thanks Neil _______________________________________________ Cvs-hugs mailing list [email protected] http://www.haskell.org/mailman/listinfo/cvs-hugs
shellcode_log.patch
(application/octet-stream, 912 B)
Index: src/winhugs/installer/ShellCode.cpp
===================================================================
RCS file: /cvs/hugs98/src/winhugs/installer/ShellCode.cpp,v
retrieving revision 1.1
diff -u -r1.1 ShellCode.cpp
--- src/winhugs/installer/ShellCode.cpp 6 Oct 2005 11:18:43 -0000 1.1
+++ src/winhugs/installer/ShellCode.cpp 12 Oct 2005 11:31:53 -0000
@@ -2,6 +2,7 @@
#include "Parameters.h"
#include <shlobj.h>
#include "FileCode.h"
+#include "InstallLog.h"
bool OleReady;
@@ -57,7 +58,10 @@
}
psl->Release();
}
- return (SUCCEEDED(hres) ? true : false);
+ bool Res = (SUCCEEDED(hres) ? true : false);
+ if (Res)
+ WriteInstallLog("FILE %s", Destination);
+ return Res;
}
@@ -124,6 +128,8 @@
{
RegSetValueEx(hKey, Local, 0, REG_SZ, (BYTE*) Value, strlen(Value)+1);
RegCloseKey(hKey);
+
+ WriteInstallLog("REG\tHKEY_CLASSES_ROOT\t%s", Path);
}
}