Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to use VBScript to launch a web form that requires the user to fill it out and then at the end of it, check whether they completed the form or cancelled out. I do not have control over the form itself (encoded javascript mess), but I can tell whether the form was completed by virtue of the results saved in Active Directory (user attribute is modified). I'd like to be able to run my script, check for the attribute, if not configured properly it launches the web form in IE, and waits until the IE session is closed, then checks the same LDAP attribute to determine what the user did. If they didn't complete the form properly, I need it to log them off. I can make everything work except pausing the script while IE is active. I've tried...

retval = objShell.Run("iexplore.exe " & url, 1, True) wscript.echo "browser session finished"

But the RUN method ignores "iexplore.exe" and continues on (even with Wait=True). All of the script examples for launching via CreateObject("InternetExplorer.Application") use the Sleep method, but I can't use a fixed timer duration. Some users take much longer than others. I hope this makes sense. I just need to be able to launch IE and wait for it to be closed.

share|improve this question

Here's the answer:

share|improve this answer
It's good that you found the solution, but just a link is considered spam when it's right to your own blog. Care to share the solution here? – random Apr 25 '11 at 2:43

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .