Page 1 of 1

Check service state function won't work

Posted: Fri Sep 17, 2010 8:36 am
by Bar_BQ
Hi,


I have just noticed that [Check service state] function doesn't work anymore. It always returns NOTINSTALLED value no matter if a service is really installed or not. The same result on WIn7x64 and WinXPx32.
What's wrong?

Re: Check service state function won't work

Posted: Fri Sep 17, 2010 6:58 pm
by mills
On XP SP3 (32 bit) and Win7 (64 bit), I get:

Result for non-existent service: NOTINSTALLED.
Result for installed, but not running services: STOPPED.

Could you possibly be referencing the variable that returns the result incorrectly? Are there any spaces in your command parameters somewhere?

Re: Check service state function won't work

Posted: Mon Sep 20, 2010 2:09 am
by Bar_BQ
Doubtfully, here is the sample code (in the example I check service named "Faks" (in polish Fax)):

Set Variable TEST to
Check Service State for Faks (write result into variable TEST)
MessageBox: , $TEST$

~InstallAware Clipboard Data~
~MessageBox~
~{7927ADFC-DF8F-4571-954C-3AD146D21DE9}~
~~
~$TEST$~
~0~
~1~
~~
~Check Service~
~{4A9DC0BE-E752-45C5-9C2A-42D63944C58C}~
~Faks~
~~
~TEST~
~Set Variable~
~{7AFA44AC-B02D-4B2A-9406-A315A3E28A90}~
~TEST$MYAH$MYAH$FALSE~
~~


Result: NOTINSALLED :(

Re: Check service state function won't work

Posted: Mon Sep 20, 2010 2:35 pm
by mills
What does the following produce:
(run from command line)

sc.exe query Faks

Re: Check service state function won't work

Posted: Tue Sep 28, 2010 4:12 am
by Bar_BQ
Hi Mills,

I apologize for late answer, but I had other unxepected job to do.
I ran sc.exe and I get response that this(or any other) service is not installed. So this means something wrong with sc application :(


Edit:

I was wrong with using service display name instead of its key name. Works fine now. Thanks!