Calling A Particular Program to Launch Automatically after Running Another Program

Discussion in 'Tutorials and Guides' started by moe-todo-logic, Jan 14, 2014.

  1. moe-todo-logic

    moe-todo-logic Regular Member

    Joined:
    Mar 23, 2010
    Messages:
    75
    Trophy Points:
    16
    Ratings:
    +3 / 0 / -0
    Hi guys,

    First of all, I know nothing about computer programming. I don't know the correct keywords to look up my question in the forum's search feature. Do inform me if related topics already existed.

    The question is,
    If I wish to execute Internet Explorer and then right after that I will have my proxy software, HandyCache, followed sequentially, would this scenario be possible? May be by creating some so-called batch scripts or else?

    Thank you in advance,
     
  2. DNT

    DNT Prominent Member

    Joined:
    Jan 12, 2014
    Messages:
    1,039
    Trophy Points:
    185
    Ratings:
    +235 / 0 / -0
    With batch files, one method could be this:

    Paste this code in a new text file with .bat extension. Modify the code at convenience (paths to programs...)
    Code:
    @echo off
    
    REM start Internet Explorer
    start iexplore.exe
    
    REM set timeout for Windows XP or newer (chage 6 for the seconds to wait plus 1 : this is an aproximation)
    ping -n 6 127.0.0.1 > NUL
    
    REM  set timeout for windows vista or newer (chage 5 for the seconds to wait)
    REM timeout /T 5
    
    REM start another program
    start /b "Program 2" "%PROGRAMFILES%\HandyCache\HandyCache.exe"
    
    REM close the cmd window
    exit
    It doesn't check if Internet Explorer is running before opening HandyCache. It just launches HandyCache the specified seconds after Internet Explorer has been called.

    Making a more accurate batch file involves controlling if iexplore.exe process is running before launching HandyCache. That is a bit more complicated than this simple script.
    Of course, surely there are better ways to do what you want.

    I don't know how HandyCache works. Being a proxy, usually you configure and IP adress (127.0.0.1) and a port number (8080) in the settings of internet explorer. If HandyCache works as a service or is already running and IE is configured to use it as proxy it should work directly.

    If you are looking for a way to enable/disable the proxy settings on IE without going through all the menus, there are little programs that does exactly that.
     
  3. moe-todo-logic

    moe-todo-logic Regular Member

    Joined:
    Mar 23, 2010
    Messages:
    75
    Trophy Points:
    16
    Ratings:
    +3 / 0 / -0
    Hi DNT,

    Sorry for not giving any replies after so long.

    Thank you for your brief guidance. That is supposed to work too.
     

Share This Page...