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?
Check service state function won't work
Re: Check service state function won't work
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?
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.
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.
Re: Check service state function won't work
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
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
What does the following produce:
(run from command line)
sc.exe query Faks
(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.
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.
Re: Check service state function won't work
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!
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!

