Check service state function won't work

Got a problem you cannot solve? Try here.
Post Reply
Bar_BQ
Posts: 99
Joined: Fri Aug 22, 2008 5:45 am

Check service state function won't work

Post 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?
mills
Posts: 814
Joined: Tue Jul 06, 2010 7:10 pm
Location: Honolulu, HI

Re: Check service state function won't work

Post 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?
Andy Mills
InstallAware
Other Help:
White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Product Guides - http://www.installaware.com/publication ... guides.htm
InstallAware Help - Press F1 in the InstallAware IDE.
Bar_BQ
Posts: 99
Joined: Fri Aug 22, 2008 5:45 am

Re: Check service state function won't work

Post 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 :(
mills
Posts: 814
Joined: Tue Jul 06, 2010 7:10 pm
Location: Honolulu, HI

Re: Check service state function won't work

Post by mills »

What does the following produce:
(run from command line)

sc.exe query Faks
Andy Mills
InstallAware
Other Help:
White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Product Guides - http://www.installaware.com/publication ... guides.htm
InstallAware Help - Press F1 in the InstallAware IDE.
Bar_BQ
Posts: 99
Joined: Fri Aug 22, 2008 5:45 am

Re: Check service state function won't work

Post 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!
Post Reply