HELP with relevance

(imported topic written by rmnetops91)

I need to determine the full executable path of a specific Windows service to perform an exists/not exists relevance comparison. Anyone know the syntax?

(imported comment written by NoahSalzman)

image paths of services

or for a specific service…

image path of service “BESClient”

(imported comment written by rmnetops91)

I saw that from another post, but I need to compare the actual full path of a service executable to something I define.

Like

If image path of service “BESClient” = C:\BESClient then true

(imported comment written by jessewk)

image path of service “BESClient” as string = “c:\path\you\want\to\check”

(imported comment written by rmnetops91)

Jessewk,

Thanks for the input. I didn’t have much luck with that relevance, but I did with this one:

exists image path whose (it contains “C:\Program Files\BigFix Enterprise\BES Client\BESClient.exe”) of service “BESClient”

(imported comment written by jessewk)

image paths are often null terminated so that’s probably the reason it didn’t work with an exact match.

(imported comment written by rmnetops91)

Your exactly right. In our case the service we were interested in, had %systemroot% specified in the image path, and the relevance check does not translate that into “C:\WINDOWS” like most applications within the OS. The relevance was checking for an exact match.

(imported comment written by jessewk)

ah, in that case another trick would be to use the ‘expand environment strings’ inspector:

exists image path whose ((expand environment string of it) starts with “C:\Program Files\BigFix Enterprise\BES Client\BESClient.exe”) of service “BESClient”