Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Mar 6th, 2006, 3:51 PM   #1
Chris
Newbie
 
Join Date: Mar 2006
Posts: 9
Rep Power: 0 Chris is on a distinguished road
Question Command to Log-Out??

Hi guys,

i'm trying to find a command to close a browser and log-out from the internet, which i want to save in a .bat file. Is there such a command?

Thanks so much in advance.
Chris is offline   Reply With Quote
Old Mar 6th, 2006, 4:50 PM   #2
Prm753
Professional Programmer
 
Prm753's Avatar
 
Join Date: Oct 2005
Location: United States
Posts: 447
Rep Power: 3 Prm753 is on a distinguished road
Send a message via AIM to Prm753 Send a message via MSN to Prm753
Hast thou triest Google yet?
__________________
The world's first athletic computer geek!
The home of PrProgramsStudios
How not to post a question: <-- Please don't reply
Prm753 is offline   Reply With Quote
Old Mar 6th, 2006, 5:24 PM   #3
Ooble
I eat cake for breakfast.
 
Ooble's Avatar
 
Join Date: Jul 2004
Location: In my box.
Posts: 4,434
Rep Power: 9 Ooble is on a distinguished road
I'm assuming you're using Windows, as you mentioned a ".bat" file.

To close a browser, you'll need the window handle - the unique ID Windows assigns to each open window. You can then send it the WM_QUIT message, which is the equivalent of clicking the X button in the top-right. I doubt this is possible using a batch file.

As to "logging out from the Internet": do you have a dial-up Internet connection, or a broadband provider that you have to connect to manually, as opposed to being always on?
__________________
Me :: You :: Them
Ooble is offline   Reply With Quote
Old Mar 6th, 2006, 6:12 PM   #4
Chris
Newbie
 
Join Date: Mar 2006
Posts: 9
Rep Power: 0 Chris is on a distinguished road
I'm using DSL guys. If something different applies for dial-up, please give me both. I'm trying to help some friends with this.

I did google it for some results but didn't quite find what i'm looking for.
Be honest, i'm not even sure if it's possible. I was more thinking in terms of a 'call' command, and insert the directory that corresponds to logging-out? Don't know.

Thanks for your responses.
Chris is offline   Reply With Quote
Old Mar 6th, 2006, 6:35 PM   #5
Ooble
I eat cake for breakfast.
 
Ooble's Avatar
 
Join Date: Jul 2004
Location: In my box.
Posts: 4,434
Rep Power: 9 Ooble is on a distinguished road
Is there an application that came with your DSL that you run to connect? If so, what's it called?
__________________
Me :: You :: Them
Ooble is offline   Reply With Quote
Old Mar 6th, 2006, 9:29 PM   #6
Cache
Hobbyist
 
Join Date: Sep 2005
Posts: 261
Rep Power: 3 Cache is on a distinguished road
Closing the browser is easy enough:

TASKKILL /F /IM iexplore.exe /FI "STATUS eq RUNNING"
Cache is offline   Reply With Quote
Old Mar 6th, 2006, 10:12 PM   #7
Uday
Programmer
 
Join Date: Oct 2005
Location: India
Posts: 30
Rep Power: 0 Uday is on a distinguished road
TASKKILL /F /IM iexplore.exe /FI "STATUS eq RUNNING"

This command is not working in windows 98
Uday is offline   Reply With Quote
Old Mar 6th, 2006, 10:44 PM   #8
Cache
Hobbyist
 
Join Date: Sep 2005
Posts: 261
Rep Power: 3 Cache is on a distinguished road
Quote:
Originally Posted by Uday
TASKKILL /F /IM iexplore.exe /FI "STATUS eq RUNNING"

This command is not working in windows 98
Then taskkill.exe doesn't come with Windows 98.
Cache is offline   Reply With Quote
Old Mar 7th, 2006, 1:28 AM   #9
Chris
Newbie
 
Join Date: Mar 2006
Posts: 9
Rep Power: 0 Chris is on a distinguished road
sorry guys but TASKKILL didn't work for me either.

TASKKILL /F /IM iexplore.exe /FI "STATUS eq RUNNING"

'TASKKILL' is not recognized as an internal or external command,
operable program or batch file.



I guess i want to open and close this application in essence: "C:\Program Files\Yahoo!\browser\ybrowser.exe"
Chris is offline   Reply With Quote
Old Mar 7th, 2006, 1:10 PM   #10
Ooble
I eat cake for breakfast.
 
Ooble's Avatar
 
Join Date: Jul 2004
Location: In my box.
Posts: 4,434
Rep Power: 9 Ooble is on a distinguished road
You shouldn't terminate the task like that - if it's in the middle of processing information or writing to disk, you could lose valuable data. Best to use the WM_QUIT message, which allows it to finish, save all data, and exit gracefully.
__________________
Me :: You :: Them
Ooble is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 5:17 PM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC