Is there a way to get more info on a Service than just whether or not it is
running?
I would like to know the path it is running from.
Any ideas?
Thanks,
--Glenn.
Printable View
Is there a way to get more info on a Service than just whether or not it is
running?
I would like to know the path it is running from.
Any ideas?
Thanks,
--Glenn.
Glenn,
> Is there a way to get more info on a Service than just whether or not it
> is running?
> I would like to know the path it is running from.
>
> Any ideas?
With the Windows Service APIs (Advapi32.dll), it should be possible to use
the "QueryServiceConfig" API to retrieve the binary path. But there is no
built-in function in SetupBuilder to handle this, so you have to develop
your own small DLL and call this from the installer.
Open a handle to the service using the "OpenService" API, then call
"QueryServiceConfig" and the second parameter (lpServiceConfig) holds the
fully-qualified path to the service binary file in
lpServiceConfig->lpBinaryPathName.
Friedrich
That sounds good. In the mean time I found this:
Set Variable %MYSERVICEREGENTRY% to FUNCTION:Get Registry Key
Value("MyServiceName") from
"HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Servi ces"
Set Variable %MYSERVICECURPATH% to FUNCTION:Extract Full
Folder(%MYSERVICEREGENTRY%)
Thanks!
Glenn Paschal