- Fix displaying the full executable path, plus arguments
[reactos.git] / reactos / subsys / system / servman / query.c
index fcd3ee4..64ef8bd 100644 (file)
@@ -80,8 +80,6 @@ BOOL GetExecutablePath(LPTSTR *ExePath)
     ENUM_SERVICE_STATUS_PROCESS *Service = NULL;\r
     LVITEM item;\r
     DWORD BytesNeeded = 0;\r
-    TCHAR FileName[MAX_PATH];\r
-\r
 \r
     item.mask = LVIF_PARAM;\r
     item.iItem = GetSelectedItem();\r
@@ -131,18 +129,7 @@ BOOL GetExecutablePath(LPTSTR *ExePath)
         }\r
     }\r
 \r
-    ZeroMemory(&FileName, MAX_PATH);\r
-    if (_tcscspn(pServiceConfig->lpBinaryPathName, _T("\"")))\r
-    {\r
-        _tcsncpy(FileName, pServiceConfig->lpBinaryPathName,\r
-            _tcscspn(pServiceConfig->lpBinaryPathName, _T(" ")) );\r
-    }\r
-    else\r
-    {\r
-        _tcscpy(FileName, pServiceConfig->lpBinaryPathName);\r
-    }\r
-\r
-    *ExePath = FileName;\r
+    *ExePath = pServiceConfig->lpBinaryPathName;\r
 \r
     CloseServiceHandle(hSCManager);\r
     CloseServiceHandle(hSc);\r