Kinook Software Forum

Kinook Software Forum (https://www.kinook.com/Forum/index.php)
-   [VBP] General Discussion (https://www.kinook.com/Forum/forumdisplay.php?f=2)
-   -   Start/Stop service with wait (https://www.kinook.com/Forum/showthread.php?t=4460)

Shiamak 04-30-2014 04:58 PM

What "operation" do you have to perfrom to get SERVICE_START_TYPE ?

I did try "Query Status" I did get the value of SERVICE_STATUS but VB did not recognize SERVICE_START_TYPE ??

kinook 04-30-2014 05:31 PM

It is the Query status operation.
http://www.kinook.com/VisBuildPro/Ma...icemaintab.htm

I tried it with the Windows Update service and got these temporary macros:
SERVICE_START_TYPE = 2
SERVICE_STATUS = 4

Shiamak 05-01-2014 01:22 PM

Quote:

Originally Posted by kinook (Post 20759)
It is the Query status operation.
http://www.kinook.com/VisBuildPro/Ma...icemaintab.htm

I tried it with the Windows Update service and got these temporary macros:
SERVICE_START_TYPE = 2
SERVICE_STATUS = 4


I am still not seeing SERVICE_START_TYPE, though I do see SERVICE_STATUS, I am using VBP 8.6..

What I may be missing?

Shiamak 05-01-2014 01:30 PM

Quote:

Originally Posted by Shiamak (Post 20760)
I am still not seeing SERVICE_START_TYPE, though I do see SERVICE_STATUS, I am using VBP 8.6..

What I may be missing?

OK, you are right, when I attempted with wuauserv (windows update service) I got values for both system variables, but when I attempted the same with our custom NT service, I am only getting SERVICE_STATUS, whyz this?

kinook 05-01-2014 05:52 PM

The Service action looks for the startup type in the registry at HKEY_LOCAL_MACHINE\System\CurrentControlSet\servic es\
looking for a DWORD value named Start under that key. The action will attempt to convert the Service name property to the key name via the GetServiceKeyName API and use that if available.

Maybe that value isn't defined for your custom service?

Shiamak 05-01-2014 06:23 PM

I do see DWORD value set as 2 in the registry for our custom services.......:-(..

I dont wanna spend time writing complete code to get status, so any help getting it done via VBP 8.6 is totally appreciated.

kinook 05-01-2014 07:23 PM

1 Attachment(s)
Strange. In the latest build (VisBuildAct.dll 8.6.0.4), the Service action has been modified to use the QueryServiceConfig API instead of a registry lookup to get the startup type. If that doesn't work, you might try using the Read Registry action (something like the attached).

Shiamak 05-01-2014 07:30 PM

That is what I started doing since I got your last reply which has worked, how do I get the latest build? do I have to pay or update will be free?

kinook 05-01-2014 07:32 PM

All 8.x updates are included with a v8 purchase. Latest version is at
http://www.kinook.com/VisBuildPro/download.html


All times are GMT -5. The time now is 01:56 PM.


Copyright © 1999-2023 Kinook Software, Inc.