Kinook Software Forum

Go Back   Kinook Software Forum > Visual Build Professional > [VBP] General Discussion
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 04-14-2010, 05:29 AM
ASolovey ASolovey is online now
Registered User
 
Join Date: 05-25-2005
Posts: 13
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
Reply With Quote
  #2  
Old 04-14-2010, 10:26 AM
kinook kinook is online now
Administrator
 
Join Date: 03-06-2001
Location: Colorado
Posts: 6,034
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
Reply With Quote
  #3  
Old 04-14-2010, 11:17 AM
ASolovey ASolovey is online now
Registered User
 
Join Date: 05-25-2005
Posts: 13
Quote:
Originally posted by kinook
Use the Query status operation to check the service status and perform an action accordingly.
Could you please advice me on how to perform some other steps conditionally depending on "query status" results?
This step as far as I see simply outputs some text to the build output.
Reply With Quote
  #4  
Old 04-14-2010, 11:22 AM
kinook kinook is online now
Administrator
 
Join Date: 03-06-2001
Location: Colorado
Posts: 6,034
Check the value of the SERVICE_STATUS temporary macro.
http://www.kinook.com/VisBuildPro/Ma...icemaintab.htm
Reply With Quote
  #5  
Old 04-14-2010, 11:28 AM
ASolovey ASolovey is online now
Registered User
 
Join Date: 05-25-2005
Posts: 13
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...
Reply With Quote
  #6  
Old 04-14-2010, 11:33 AM
kinook kinook is online now
Administrator
 
Join Date: 03-06-2001
Location: Colorado
Posts: 6,034
Refresh your browser, or download and install the latest build.
Attached Images
 
Reply With Quote
  #7  
Old 04-14-2010, 11:52 AM
ASolovey ASolovey is online now
Registered User
 
Join Date: 05-25-2005
Posts: 13
Regarding a latest build - yah, we will consider this in the near future.
Regarding refreshing the browser - now is much better!

Thanks
Reply With Quote
  #8  
Old 05-14-2013, 01:37 PM
Shiamak Shiamak is online now
Registered User
 
Join Date: 02-07-2006
Posts: 84
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!!
Reply With Quote
  #9  
Old 05-14-2013, 02:30 PM
kinook kinook is online now
Administrator
 
Join Date: 03-06-2001
Location: Colorado
Posts: 6,034
The Service action does not currently expose the startup type, but we'll add it to the request list.
Reply With Quote
  #10  
Old 05-14-2013, 02:51 PM
Shiamak Shiamak is online now
Registered User
 
Join Date: 02-07-2006
Posts: 84
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..
Reply With Quote
  #11  
Old 05-14-2013, 06:46 PM
Shiamak Shiamak is online now
Registered User
 
Join Date: 02-07-2006
Posts: 84
Hello There,

Upon Querying a specific service, I dont see any values being assigned to SERVICE_STATUS macro...what I might be doing wrong?
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



All times are GMT -5. The time now is 10:22 PM.


Copyright © 1999-2023 Kinook Software, Inc.