Need Urgently

(imported topic written by SystemAdmin)

Does anyone know the relevance to pull in the Startup Type of a Windows service “Automatic/Manual/Disabled”?

(imported comment written by jeremylam)

Try:

(display name of it, start type of it) of services

There’s some mapping you have to do (demand = Manual, auto = Automatic) but it looks pretty good to me.

(imported comment written by SystemAdmin)

I was able to put something together. Not the most efficient, but it worked.

if ((exists service “W3SVC”) and (value “Start” of key “HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W3SVC” of registry = 2)) then “Automatic”

else

if ((exists service “W3SVC”) and (value “Start” of key “HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W3SVC” of registry = 3)) then “Manual”

else

if ((exists service “W3SVC”) and (value “Start” of key “HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W3SVC” of registry = 4)) then “Disabled”

else

“NA”

(imported comment written by kevin_tang91)

shorter one:

q:if (exists service “W3SVC”) then (if it = 2 then “Automatic” else if it = 3 then “Manual” else if it = 4 then “Disabled” else “N/A”) of value “Start” of key “HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W3SVC” of registry else “N/A”

A: N/A