Solved

Logoff Script - Execute and Wait

Posted on 2004-04-06
6
11,380 Views
Last Modified: 2010-05-18
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...
0
Comment
Question by:dgooding
  • 3
  • 2
6 Comments
 
LVL 10

Expert Comment

by:Kavar
ID: 10770971
change to start /wait http://website.com
0
 
LVL 2

Author Comment

by:dgooding
ID: 10774503
that didn't work.
0
 
LVL 2

Author Comment

by:dgooding
ID: 10775016
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...

***logoff.vbs***
Set WshShell = WScript.CreateObject("WScript.Shell")
ReturnCode = WshShell.Run("iexplore http://website.com", 1, True)
0
3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

 
LVL 10

Expert Comment

by:Kavar
ID: 10776339
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
0
 
LVL 2

Author Comment

by:dgooding
ID: 10776369
I have figured it out myself, I would like my points refunded.  (see above for solution)
0
 

Accepted Solution

by:
modulo earned 0 total points
ID: 10807128
A request has been made in Community Support to close this question:

http://www.experts-exchange.com/Community_Support/Q_20951085.html

As there are no objections finalized by:

- PAQ-ing the question and refunding 65 points

modulo

Community Support Moderator
Experts Exchange
0

Featured Post

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

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

Introduction: Recently, I got a requirement to zip all files individually with batch file script in Windows OS. I don't know much about scripting, but I searched Google and found a lot of examples and websites to complete my task. Finally, I was ab…
Whether you've completed a degree in computer sciences or you're a self-taught programmer, writing your first lines of code in the real world is always a challenge. Here are some of the most common pitfalls for new programmers.
An introduction to basic programming syntax in Java by creating a simple program. Viewers can follow the tutorial as they create their first class in Java. Definitions and explanations about each element are given to help prepare viewers for future …

773 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