![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
|
|
#1 |
|
Newbie
Join Date: Mar 2006
Posts: 9
Rep Power: 0
![]() |
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. |
|
|
|
|
|
#2 |
|
Professional Programmer
|
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 |
|
|
|
|
|
#3 |
|
I eat cake for breakfast.
![]() ![]() ![]() ![]() Join Date: Jul 2004
Location: In my box.
Posts: 4,434
Rep Power: 9
![]() |
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? |
|
|
|
|
|
#4 |
|
Newbie
Join Date: Mar 2006
Posts: 9
Rep Power: 0
![]() |
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. |
|
|
|
|
|
#5 |
|
I eat cake for breakfast.
![]() ![]() ![]() ![]() Join Date: Jul 2004
Location: In my box.
Posts: 4,434
Rep Power: 9
![]() |
Is there an application that came with your DSL that you run to connect? If so, what's it called?
|
|
|
|
|
|
#6 |
|
Hobbyist
Join Date: Sep 2005
Posts: 261
Rep Power: 3
![]() |
Closing the browser is easy enough:
TASKKILL /F /IM iexplore.exe /FI "STATUS eq RUNNING" |
|
|
|
|
|
#7 |
|
Programmer
Join Date: Oct 2005
Location: India
Posts: 30
Rep Power: 0
![]() |
TASKKILL /F /IM iexplore.exe /FI "STATUS eq RUNNING"
This command is not working in windows 98 |
|
|
|
|
|
#8 | |
|
Hobbyist
Join Date: Sep 2005
Posts: 261
Rep Power: 3
![]() |
Quote:
|
|
|
|
|
|
|
#9 |
|
Newbie
Join Date: Mar 2006
Posts: 9
Rep Power: 0
![]() |
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" |
|
|
|
|
|
#10 |
|
I eat cake for breakfast.
![]() ![]() ![]() ![]() Join Date: Jul 2004
Location: In my box.
Posts: 4,434
Rep Power: 9
![]() |
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.
|
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|