WaitForWspJob.exe is a tool that will wait for the Admin Service to finish the deployment or retraction of a SharePoint solution (wsp).
Posting about the tool: http://blog.michelbarneveld.nl/michel/archive/2010/04/05/waitforwspjob-tool.aspx
Download sources at http://blog.michelbarneveld.nl/media/p/5624.aspx
Usage
The tool accepts the solution file name or the solution id (guid) and you can give it a timeout value. By default it waits 5 minutes for the solutiion job to finish before it returns control.
Usage:
WaitForWspJob.exe <wsp> [<timeout>]
Arguments:
wsp The name or guid of the SharePoint solution
timeout The maximum wait time in minutes. Default: 5
Examples:
WaitForWspJob.exe ExampleSharePointSolution.wsp
WaitForWspJob.exe ExampleSharePointSolution.wsp 10
WaitForWspJob.exe 3ce2bc5d-69b2-47bd-bd89-80d138f4faba