Solved

VBScript - WaitForSingleObject

Posted on 2007-11-20
1
1,515 Views
Last Modified: 2012-05-05
Hi,

I am looking for a working example in VBScript to use the API waitforsingleobject.  I have working code for this in VB6 but need this for VBScript as well.  

Thanks.
0
Comment
Question by:1500orion
1 Comment
 
LVL 38

Accepted Solution

by:
PaulHews earned 500 total points
ID: 20320656
You cannot call the API from vbscript.  However, you can shell and wait for a process to return:


http://msdn2.microsoft.com/en-us/library/d5fk67ky.aspx
Set WshShell = WScript.CreateObject("WScript.Shell")
 

Return = WshShell.Run("notepad " & WScript.ScriptFullName, 1, true)  'True parameter specifies to wait for return

Open in new window

0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

895 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now