CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 8 of 8
  1. #1
    Join Date
    May 1999
    Location
    Canada
    Posts
    176

    One app starts another one?

    Hello,
    I saw a program than can make any application you start play a sound file you specified. I wonder if someone here knows how to make any windows application you start (visual C++, notepad, netscape...) start (automatically) another one, say your app.
    Thanks.

    Where there is a WISH, there is a WILL.

  2. #2
    Join Date
    May 1999
    Location
    PA
    Posts
    38

    Re: One app starts another one?

    Hi,
    Definitely this is possible with the help of any one of the following APIs
    1) WinExec
    2) CreateProcess

    if this is what you want?



    Practice makes the man perfect.

  3. #3
    Join Date
    May 1999
    Location
    Canada
    Posts
    176

    Re: One app starts another one?

    Thanks for trying to help but we can't add code to the applications we start (no source).
    Ok, let's say that we wrote an application named MyApp.exe. We want MyApp to be automatically started every time we start netscape.exe. We can make MyApp start other programs with WinExec or CreateProcess. As we don't have netscape's source code, how can we make it start our application?
    Thanks you.

    Where there is a WISH, there is a WILL.

  4. #4
    Join Date
    May 1999
    Location
    PA
    Posts
    38

    Re: One app starts another one?

    Hello again,
    I am really sorry to give you wrong answer, actually I miss interprited your question and that's why I gave a wrong answer.

    Chetan

    Practice makes the man perfect.

  5. #5
    Guest

    Re: One app starts another one?

    Well it can be done in a few different ways... It seems to me thought, that it will be alot easier for your application to call netscape than for netscape to call your program. One method would be to rename the netscape.exe, call your program by that name and have your program execute both items it needs. Another option is to have your program monitor the netscape program and launch along with it, altough a peice of it would have to stay memory residant. Then again another option, if you use windows, would be to have your program intercept and launch both programs by taking over (and backing up) netscapes registry keys...
    For example replacing the netscape classid's with those of your program but leaving the keys and values for netscape configuration alone. It all depends on how much effort you want to put into it and rather you will sell it or not.


  6. #6
    Join Date
    Apr 1999
    Posts
    32

    Re: One app starts another one?

    Am I missing something? It seems a no-brainer. Why not simply put calls to both apps in a batch file. For example:

    nlaunch.bat


    @echo off
    c:\inet\browsers\ns\netscape.exe
    c:\inet\utils\myapp.exe




    Then place a shortcut to the batch file on your desktop or Start menu.


    --
    Daren Chandisingh

  7. #7
    Guest

    Re: One app starts another one?

    Possibly there is a work around using the registry. I had seen some keys relating to this.

    Hope this helps.


  8. #8
    Join Date
    May 1999
    Location
    Canada
    Posts
    176

    Re: One app starts another one?

    Thanks to all of you guys. I think that the registry stuff is what I was looking for.

    Where there is a WISH, there is a WILL.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured