src/ServiceFB/ServiceFB_Utils.bas in thin_service-0.0.5 vs src/ServiceFB/ServiceFB_Utils.bas in thin_service-0.0.6

- old
+ new

@@ -96,11 +96,11 @@ end if _dprint("Parent Name: " + parent_name) '# this process started as service? '# that means his parent is services.exe - if (parent_name = "services.exe") then + if (parent_name = "services.exe" Or parent_name = "<unknown>") then result = RunAsService else '# ok, it didn't start as service, analyze command line then start_mode = lcase(trim(command(1))) if (start_mode = "manage") then @@ -415,9 +415,10 @@ dim hProcess as HANDLE dim cbNeeded as DWORD dim GetProcessImageFileName as function (byval as HANDLE, byval as LPTSTR, byval as DWORD) as DWORD '# assign "<unknown>" to process name, allocate MAX_PATH (260 bytes) + result = "<unknown>" zresult = "<unknown>" + chr(0) '# get dynlib hLib = dylibload("psapi.dll") if not (hlib = 0) then