How can you create a batch that makes a message pop up when you open the Internet browser?
I'm trying to create a batch so that when you open up the Internet Explorer browser, a window pops up with a custom message that I choose. I want it to be close-able and only open once.
Public Comments
- Opening IE can't trigger a batch file.
- the only way I can think of to do that wouldnt involve batch. If you write an application using Visual Basic (6 or .NET), you can run a few API calls to retrieve a list of currently running applications. If internet explorer is present in that list, then display your message. You can also close IE using closewindowEX or shutdown the computer, etc. To make your application run all the time without you clicking it, put it in C:\Windows\tasks and set it to run at startup. www.a1vbcode.com might have what code you need.
- @echo off echo. echo This is the message that you wanted to show yourself echo It can be multiple lines if you like. It will appear in a echo command prompt window and wait for you to press a key echo. pause %1 Copy the above code into notepad and save the file somewhere that you can find it. Name it "iex.bat". Change the text that I typed to match the message you want to display. If you want to add more lines, each line must begin with the word "echo". Blank lines are created by typing echo with a period on the end. Now go to the shortcut you use to open internet explorer from your desktop or startmenu and right click on it. Click on "properties." In the dialog that appears, there is a space called target. Do not delete what is there! just click on it and then hit the 'home' key on your keyboard to take you to the beginning of the line. Type in the file location of the batch file you just made, and add a space at the end. For example, mine looks like this: C:\mypath\iex.bat "C:\program files\internet explorer\iexplore.exe" Click OK, and it should run every time you click on that shortcut. This will work for any shortcuts you have.
Powered by Yahoo! Answers