Logoff Script - Execute and Wait

I am having trouble writing a logoff script for Windows2000/XP.  The idea is that when a user clicks to log off, before the machine completely logs the user off, a program will be run, and the machine will finish logging off when the program is quit.  Namely, I need the user to log off, be directed to a webpage in IE, have them input some data, close IE, and finish being logged off.  For now, I'm trying to write it in a simple .bat file, because I'm not that well versed with VB.  Here's what I have so far...

  @echo off
  start iexplore http://website.com

This however runs iexplore and finishes shutting down without waiting.  I don't want a predetermined amount of wait time, because the data input may take upwards of 3 minutes, but as few as a few seconds.  There is a software title named ActiveExit (http://www.winability.com/active-exit) that does exactly what I want.  But I don't want to have to pay for this, if a simple script will do.  

Does anyone have cure?  I don't care what scripting language it's in...
Who is Participating?
moduloConnect With a Mentor Commented:
A request has been made in Community Support to close this question:


As there are no objections finalized by:

- PAQ-ing the question and refunding 65 points


Community Support Moderator
Experts Exchange
change to start /wait http://website.com
dgoodingAuthor Commented:
that didn't work.
The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

dgoodingAuthor Commented:
I have answered the question myself.  I would like to keep this question available for others to view with an "accepted answer", but I would like to keep my points.  What do I do?  

The solution...

Set WshShell = WScript.CreateObject("WScript.Shell")
ReturnCode = WshShell.Run("iexplore http://website.com", 1, True)
sorry that didn't work start /wait tells the command processor to stay open and wait for the application to return, strange that it did not...

To close your question and request a refund, post a response with text similiar to..

I have figured it out myself, I would like my points refunded
dgoodingAuthor Commented:
I have figured it out myself, I would like my points refunded.  (see above for solution)
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.