Results 1 to 6 of 6

Thread: Vb.net 2005

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Feb 2008
    Posts
    91

    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

  2. #2
    Lively Member
    Join Date
    Sep 2007
    Location
    Texas
    Posts
    98

    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

  3. #3

    Re: Vb.net 2005

    That's a relative filepath. You should use
    Code:
    Process.Start(Application.StartupPath & "\program.exe")

  4. #4

    Thread Starter
    Lively Member
    Join Date
    Feb 2008
    Posts
    91

    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.

  5. #5
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    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.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  6. #6

    Thread Starter
    Lively Member
    Join Date
    Feb 2008
    Posts
    91

    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
  •  



Click Here to Expand Forum to Full Width