Results 1 to 11 of 11

Thread: Program launcher help (again)

  1. #1

    Thread Starter
    New Member
    Join Date
    Jun 2007
    Posts
    8

    Angry Program launcher help (again)

    Hi, I got my program launcher to start the applications i tell it to with this code:

    Code:
    Private Sub AntrixToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles AntrixToolStripMenuItem.Click
            Dim strPath As String
            strPath = Application.StartupPath & "example.exe"
            Process.Start(strPath)
        End Sub
    But, the problem now, is when it launches the program it somehow interferes with the program doing anything. When i launch things through the program launcher they don't work, but when i launch them without it they run fine.

    Can anyone help? Thanks in advance

    using Visual basic 2005
    Last edited by jargs; Jun 21st, 2007 at 02:05 PM.

  2. #2
    Hyperactive Member ProphetBeal's Avatar
    Join Date
    Aug 2006
    Location
    New York
    Posts
    424

    Re: Program launcher help (again)

    Quote Originally Posted by jargs
    Hi, I got my program launcher to start the applications i tell it to with this code:

    Code:
    Private Sub AntrixToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles AntrixToolStripMenuItem.Click
            Dim strPath As String
            strPath = Application.StartupPath & "example.exe"
            Process.Start(strPath)
        End Sub
    But, the problem now, is when it launches the program it somehow interferes with the program doing anything. When i launch things through the program launcher they don't work, but when i launch them without it they run fine.

    Can anyone help? Thanks in advance

    using Visual basic 2005
    How is the application you launched not working? Could it just be that appilcation? Try launching something simple like notepad and see if that works. BTW there is an error in the code you provided, you're missing a back slash.
    vb.net Code:
    1. Private Sub AntrixToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles AntrixToolStripMenuItem.Click
    2.         Dim strPath As String
    3.         strPath = Application.StartupPath & "\example.exe"
    4.         Process.Start(strPath)
    5.     End Sub

    Helpful Links:
    VB 6 - How to get the "Key" Value in a collection
    VB.NET - File Search Utility || VB.NET - How to compare 2 directories || VB.NET - How to trust a network share
    VB.NET - Create Excel Spreadsheet From Array || VB.NET - Example Code & Hints you may not know
    VB.NET - Save JPEG with a certain quality (image compression) || VB.NET - DragDrop Files, Emails, and Email Attachments

    Please post some of the code you need help with (it makes it easier to help you)
    If your problem has been solved then please mark the thread [RESOLVED].
    Don't forget to Rate this post

    "Pinky, you give a whole new meaning to the phrase, 'counter-intelligence'."-The Brain-

  3. #3

    Thread Starter
    New Member
    Join Date
    Jun 2007
    Posts
    8

    Re: Program launcher help (again)

    no its not the application because when i run it without the launcher it works fine... its like the launcher is stopping it from doing anything

  4. #4
    I'm about to be a PowerPoster! kleinma's Avatar
    Join Date
    Nov 2001
    Location
    NJ - USA (Near NYC)
    Posts
    23,373

    Re: Program launcher help (again)

    why dont you be more specific?

    what exactly does "stopping it from doing anything" mean?

    also what programs are you trying to launch?

    If you just try to launch notepad, using

    process.start("notepad.exe"), does that work, or are you not able to use notepad once your program launches it?

  5. #5

    Thread Starter
    New Member
    Join Date
    Jun 2007
    Posts
    8

    Re: Program launcher help (again)

    it can use notepad, but it can launch say a bat file to start mysql (stops it from doing anything)

  6. #6
    I'm about to be a PowerPoster! kleinma's Avatar
    Join Date
    Nov 2001
    Location
    NJ - USA (Near NYC)
    Posts
    23,373

    Re: Program launcher help (again)

    well then the problem is rooted somewhere either in the bat file, or in mysql.

    can you post the contents of the bat file?

  7. #7

    Thread Starter
    New Member
    Join Date
    Jun 2007
    Posts
    8

    Re: Program launcher help (again)

    this is the bat file

    @echo off
    TITLE MySQL Launcher
    ECHO @ @@@@@ @ @ @ @
    ECHO @ @ @ @ @ @ @ @ @
    ECHO @ @ @ @ @ @ @ @ @
    ECHO @ @ @ @ @ @ @ @@@ @ @@@
    ECHO @ @ @ @ @ @ @ @ @ @@ @
    ECHO @ @ @ @ @ @ @ @ @ @ @
    ECHO @ @ @ @ @ @ @ @ @ @ @
    ECHO @@@@@@@ @ @ @ @ @ @@@@@@@ @ @
    ECHO @ @ @ @ @ @ @ @ @ @
    ECHO @ @ @ @ @ @ @ @ @ @ @ @
    ECHO @ @ @ @ @ @ @ @ @@ @
    ECHO @ @ @@@@@ @ @ @@@ @ @@@



    ECHO AC-Web Ultimate Repack!
    ECHO Visit AC-Web.org for updates!
    ECHO *********Leave this window open.*********


    echo Please dont close Window while MySQL is running
    echo MySQL is trying to start
    echo Please wait ...

    echo MySQL is starting with mysql\bin\my.cnf (console)

    mysql\bin\mysqld --defaults-file=mysql\bin\my.cnf --standalone --console

    if errorlevel 1 goto error
    goto finish

    :error
    echo.
    echo MySQL could not be started
    pause

    :finish

  8. #8
    I'm about to be a PowerPoster! kleinma's Avatar
    Join Date
    Nov 2001
    Location
    NJ - USA (Near NYC)
    Posts
    23,373

    Re: Program launcher help (again)

    ok, and how are you launching the process?

    process.start(batfilenamehere.bat)

    ???

  9. #9

    Thread Starter
    New Member
    Join Date
    Jun 2007
    Posts
    8

    Re: Program launcher help (again)

    yes like that but the code in the first post

  10. #10
    Hyperactive Member ProphetBeal's Avatar
    Join Date
    Aug 2006
    Location
    New York
    Posts
    424

    Re: Program launcher help (again)

    This may seem like a dumb question, but is the command window displaying? If so, where in the batch file does it stop executing?

    Helpful Links:
    VB 6 - How to get the "Key" Value in a collection
    VB.NET - File Search Utility || VB.NET - How to compare 2 directories || VB.NET - How to trust a network share
    VB.NET - Create Excel Spreadsheet From Array || VB.NET - Example Code & Hints you may not know
    VB.NET - Save JPEG with a certain quality (image compression) || VB.NET - DragDrop Files, Emails, and Email Attachments

    Please post some of the code you need help with (it makes it easier to help you)
    If your problem has been solved then please mark the thread [RESOLVED].
    Don't forget to Rate this post

    "Pinky, you give a whole new meaning to the phrase, 'counter-intelligence'."-The Brain-

  11. #11
    I'm about to be a PowerPoster! kleinma's Avatar
    Join Date
    Nov 2001
    Location
    NJ - USA (Near NYC)
    Posts
    23,373

    Re: Program launcher help (again)

    you should probably execute cmd.exe instead of the batch file, but pass the batch file are a parameter.

    This will cause the cmd window to stay open and execute the batch file, instead of running the batch file and closing right away. Try that and see if it has a different effect.

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