|
-
Mar 30th, 2010, 03:42 PM
#1
Thread Starter
Lively Member
Vb.net 2005
Hi guys, I've been working on a project for my community..
So here's the deal
I've placed an .exe file in the same directory as the setup file lands into AND "Program version" folder which I get when I publish it.
When I try to hit the button which helds the command shell ("program.exe") then it tells me: File not found..
I've been saving, moving around, renamed and everything.. What could possibly be wrong?
I've even tried this:
Private Sub ToolStripMenuItem3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ToolStripMenuItem3.Click
System.Diagnostics.Process.Start("program.exe")
End Sub
-
Mar 30th, 2010, 04:25 PM
#2
Lively Member
Re: Vb.net 2005
Check the path you are using in shell ("program.exe")
Even the smallest spelling mistake, extra space etc will cause this problem
Hope this helps
Working in VB2005 and SQL2005
-
Mar 30th, 2010, 05:14 PM
#3
Re: Vb.net 2005
That's a relative filepath. You should use
Code:
Process.Start(Application.StartupPath & "\program.exe")
-
Mar 30th, 2010, 05:54 PM
#4
Thread Starter
Lively Member
Re: Vb.net 2005
@formlesstree4 & SunshineBH
Check this image out, I can't understand why this doesn't work.
http://img714.imageshack.us/img714/7821/probo.jpg
I edit my program URL to another one, publish it.. Message comes up "Overwrite? Y/N" and ofcourse I press yes. Launch the "SETUP.exe" to test it out and still brings me the error.
-
Mar 31st, 2010, 01:05 AM
#5
Re: Vb.net 2005
The fact that you have another EXE in the same folder as your installer is irrelevant. The installer is not the application; it installs the application... to a different folder. When you run the app the other EXE isn't there because it's back in the other folder containing the installer. If you want this other EXE to be in the same folder as your application then you have to add it to the installer so that it gets installed with your app. As you're using ClickOnce, that means adding it to the project and setting its Build Action to Content. You can then check the Application Files on the Publish page of the project properties to make sure the file is included in the publish package.
-
Mar 31st, 2010, 05:00 AM
#6
Thread Starter
Lively Member
Re: Vb.net 2005
jmcilhinney, thank you for the reply I'll try that when I get home. Thanks again!
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
|