|
-
Jun 21st, 2007, 01:14 PM
#1
Thread Starter
New Member
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.
-
Jun 21st, 2007, 02:47 PM
#2
Re: Program launcher help (again)
 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:
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
-
Jun 21st, 2007, 02:49 PM
#3
Thread Starter
New Member
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
-
Jun 21st, 2007, 03:01 PM
#4
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?
-
Jun 21st, 2007, 03:03 PM
#5
Thread Starter
New Member
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)
-
Jun 21st, 2007, 03:05 PM
#6
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?
-
Jun 21st, 2007, 03:14 PM
#7
Thread Starter
New Member
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
-
Jun 21st, 2007, 03:24 PM
#8
Re: Program launcher help (again)
ok, and how are you launching the process?
process.start(batfilenamehere.bat)
???
-
Jun 22nd, 2007, 09:41 AM
#9
Thread Starter
New Member
Re: Program launcher help (again)
yes like that but the code in the first post
-
Jun 22nd, 2007, 12:13 PM
#10
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?
-
Jun 22nd, 2007, 01:15 PM
#11
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|