Jump to content
Sign in to follow this  

Problem in calling ExitHandler during logoff on windows 98

Recommended Posts


I have an application that opens a IE window, navigates to a URL, logs in the user to a device and keeps running in the background

What I want to achieve is, when the user does windows log off, the ExitHandler of my program should get called and in that I want to navigate to some other URL in the existing IE window to logout the user from the device.

Now on Win XP, this thing works fine, but on Windows 98 machine, this doesn't work.

Navigating to the URL takes around 7-8 seconds to succeed.

This is my exit function

Func MyExitFunction ( )

LogMessage("MyExitFunction Called")

If WinExists($LogoutWindowTitleStr,"") Then

LogMessage("Navigating to URL: " & $logoutURL)

_IENavigate ($o_IE, $logoutURL)


LogMessage("Session ID file deleted.")

_IEQuit ($o_IE)

LogMessage("Logout Done.")



I am getting "Logout Done" message in the log file, but navigation to the URL does not seem to complete as the user is not getting logged out of the device.

However during program exit, the ExitHandler gets called and logoff happens successfully.

Can anybody pls help me here?

-Thanks in advance,


Share this post

Link to post
Share on other sites

What IE version are you using on 9x?

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Share this post

Link to post
Share on other sites

What IE version are you using on 9x?

Am using IE 6.0.

But does this matter?

I read somewhere that 98, NT, ME do not have a mechanism of calling log off script. Does this mean that logoff time we cannot control anything?

Alternatively what I thought was, if somehow I can catch the windows logoff event, ignore it, call my exithandler and then call windows logoff. But I couldn't find anything to do such a thing.

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...