--- gui.c.old	2006-11-05 00:35:52.000000000 +0000
+++ gui.c	2006-11-17 17:59:22.000000000 +0000
@@ -216,6 +216,20 @@
 	VerInfo.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
 	GetVersionEx(&VerInfo);
 	GetOSName(VerInfo, OSName);
+	
+	{ /* Set Current Directory */
+		TCHAR path[MAX_PATH];
+		if(GetModuleFileName(NULL, path, MAX_PATH))
+		{
+			char *pname = strrchr(path, '\\');
+			if(pname != NULL)
+			{
+				*pname = '\0';
+				SetCurrentDirectory(path);
+			}
+		}
+	}
+
 	if (VerInfo.dwPlatformId == VER_PLATFORM_WIN32_NT) 
 	{
 		SC_HANDLE hService, hSCManager = OpenSCManager(NULL, NULL, GENERIC_EXECUTE);
