extern bool is_admin;\r
extern imports_t imports;\r
\r
+static TCHAR unquoted_imagepath[PATH_LENGTH];\r
+static TCHAR imagepath[PATH_LENGTH];\r
+\r
/* Are two strings case-insensitively equivalent? */\r
int str_equiv(const TCHAR *a, const TCHAR *b) {\r
size_t len = _tcslen(a);\r
return (int) i;\r
}\r
\r
+const TCHAR *nssm_unquoted_imagepath() {\r
+ return unquoted_imagepath;\r
+}\r
+\r
+const TCHAR *nssm_imagepath() {\r
+ return imagepath;\r
+}\r
+\r
int _tmain(int argc, TCHAR **argv) {\r
check_console();\r
\r
/* Set up function pointers. */\r
if (get_imports()) exit(111);\r
\r
+ /* Remember our path for later. */\r
+ GetModuleFileName(0, unquoted_imagepath, _countof(unquoted_imagepath));\r
+ GetModuleFileName(0, imagepath, _countof(imagepath));\r
+ PathQuoteSpaces(imagepath);\r
+\r
/* Elevate */\r
if (argc > 1) {\r
/*\r
int str_number(const TCHAR *, unsigned long *);\r
int num_cpus();\r
int usage(int);\r
+const TCHAR *nssm_unquoted_imagepath();\r
+const TCHAR *nssm_imagepath();\r
\r
#define NSSM _T("NSSM")\r
#ifdef _WIN64\r