#1
|
|||
|
|||
Start/Stop service with wait
Hi,
We'd like to control service during build procedure. We need to stop it AND WAIT UNTIL it starts, then we need to start it AND WAIT UNTIL it stops. I don't see now how to do that. The timeout option of "service" step doesn't do that. It seems that this step simply waits this "timeout" checking the service to BEGIN DOING THE ACTION rather than wait for its completion. The behavior is this: We stop the service with timeout=15 sec, the service doesn't stop within this timeframe, but step succeeds immediately without any wait. Then we're trying to start the service and it of course says that the service is already running with no fail (noticed that latter is by design). Could you please advise us: 1) How to wait until the service really completed the action? 2) how to check the state of the service and perform some other steps conditionally depending on its state? Thanks! P.S. We're using VBP 7.1 |
#2
|
|||
|
|||
The Service action does wait for the service status to change to SERVICE_RUNNING (when starting) or SERVICE_STOPPED (when stopping).
Use the Query status operation to check the service status and perform an action accordingly. http://www.kinook.com/VisBuildPro/Ma...icemaintab.htm |
#3
|
|||
|
|||
Quote:
This step as far as I see simply outputs some text to the build output. |
#4
|
|||
|
|||
Check the value of the SERVICE_STATUS temporary macro.
http://www.kinook.com/VisBuildPro/Ma...icemaintab.htm |
#5
|
|||
|
|||
Thanks much!
By the way - there is no mention about SERVICE_STATUS temporary macro in the link you provided. The offline help also has nothing about it... |
#6
|
|||
|
|||
Refresh your browser, or download and install the latest build.
|
#7
|
|||
|
|||
Regarding a latest build - yah, we will consider this in the near future.
Regarding refreshing the browser - now is much better! Thanks |
#8
|
|||
|
|||
Is there a way to figure out if a NT service has been disabled? I looked into SERVICE_STATUS macro it doesnt store "disabled" value!!
|
#9
|
|||
|
|||
The Service action does not currently expose the startup type, but we'll add it to the request list.
|
#10
|
|||
|
|||
As always, Thanks a bunch for your prompt answer.. no wonder I am a fan of not only VisualBuild but also your post sale services..
Keep up the good work.. |
#11
|
|||
|
|||
Hello There,
Upon Querying a specific service, I dont see any values being assigned to SERVICE_STATUS macro...what I might be doing wrong? |
#12
|
|||
|
|||
Not sure. It's working ok here (see attached sample).
5/14/2013 6:23:07 PM: -------------------- Starting Build: 'service_status.bld' -------------------- 5/14/2013 6:23:07 PM: Building project step 1 - Project steps... 5/14/2013 6:23:07 PM: Building project step 2 - Service... Querying service 'Windows Update'... Status = Running 5/14/2013 6:23:07 PM: Building project step 3 - Show status... SERVICE_STATUS = 4 5/14/2013 6:23:07 PM: Build successfully completed (elapsed = 00:00:00). |
#13
|
|||
|
|||
Querying of the service start type is implemented in v8.4.
http://www.kinook.com/VisBuildPro/Ma...icemaintab.htm |
#14
|
|||
|
|||
Thanks a bunch for keeping up with old issues reported, your customer services and post sales services is perhaps the best I have come across.....keep up the good work..
Do you have a list of other features added to v8.4? Best Regards |
#15
|
|||
|
|||
Thread Tools | |
Display Modes | Rate This Thread |
|
|