diff options
Diffstat (limited to 'default')
-rw-r--r-- | default/default.c | 31 | ||||
-rw-r--r-- | default/default.exe | bin | 0 -> 54272 bytes | |||
-rw-r--r-- | default/reg/chrome.reg | bin | 0 -> 6910 bytes | |||
-rw-r--r-- | default/reg/mypal.reg | bin | 0 -> 4768 bytes |
4 files changed, 31 insertions, 0 deletions
diff --git a/default/default.c b/default/default.c new file mode 100644 index 0000000..5b75c6e --- /dev/null +++ b/default/default.c @@ -0,0 +1,31 @@ +#include <shlobj.h> +#include <stdio.h> +#include <windows.h> + +#pragma comment(lib, "Shell32.lib") + +int main(int argc, char *argv[]) { + char cmd[500], path[500], *p; + int r; + + if (argc != 2) { + fprintf(stderr, "usage: %s browser\n", argv[0]); + return 1; + } + + r = GetModuleFileNameA(NULL, path, 500); + if (r == 0 || r == 500) { + fprintf(stderr, "Could not get path of executable (%d).\n", GetLastError()); + return 1; + } + + p = path + strlen(path) - 1; + while (*p != '\\') p--; + *p = '\0'; + + sprintf(cmd, "reg import \"%s\\reg\\%s.reg\"", path, argv[1]); + r = system(cmd); + if (r == 0) + SHChangeNotify(SHCNE_ASSOCCHANGED, 0, 0, 0); + return r; +}
\ No newline at end of file diff --git a/default/default.exe b/default/default.exe Binary files differnew file mode 100644 index 0000000..79040dd --- /dev/null +++ b/default/default.exe diff --git a/default/reg/chrome.reg b/default/reg/chrome.reg Binary files differnew file mode 100644 index 0000000..8c00c8b --- /dev/null +++ b/default/reg/chrome.reg diff --git a/default/reg/mypal.reg b/default/reg/mypal.reg Binary files differnew file mode 100644 index 0000000..bcafc08 --- /dev/null +++ b/default/reg/mypal.reg |