CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 7 of 7

Thread: run exe

  1. #1
    Join Date
    Jul 2006
    Posts
    21

    run exe

    Hi all,


    I developed a one vb.net application , but iam not able to run exe of developed application independently......................


    the exe is working fine when i execute the exe inside the bin directroy..............


    if i execute the same exe from some other location by copying the exe ... it is giving just in time debugging error


    plz help me regarding this



    regards

    Gopikris.

  2. #2
    Join Date
    Jan 2006
    Posts
    293

    Re: run exe

    Are you talking about the same computer? Try copying all the files in the bin directory to another location, not just the EXE. Other files are there that the program uses, like resource files, settings xml files, etc. Moreso in 2005, where there are many files created other than just the EXE that the program uses. Also will happen if you are referencing any dlls that are set to "copy local", which would not exist in the application directory when you just copy the EXE. And finally, if you are referring to some sort of directory or location inside of the application's normal directory (files or subfolders in the app directory), then you would have problems as well.

    In short, it is not wise to just copy an EXE and expect it to run.. copy the entire directory, or create an actual setup project to install the program correctly.

    Of course, explaining what error it gave you is a good start...

  3. #3
    Join Date
    Feb 2000
    Location
    OH - USA
    Posts
    1,892

    Arrow Re: run exe

    The actual error details would help, but I'm willing to bet that your problem is the result of a missing dependency. And it's probably in the form of a file or folder.

    Does your program use any .dlls, images, folders, etc. that are referenced using a relative path? Look in the output folder where there is your .exe. Are there any other folder/files in there? They are probably depended upon and will need to be distributed with the .exe.

    If you didn't specifically reference any external files, did you add any legacy controls to your program? This would in turn create an Interop .dll file that will be located in the same folder as the .exe, and is needed for your app to function properly.
    Good Luck,
    Craig - CRG IT Solutions - Microsoft Gold Partner

    -My posts after 08/2015 = .NET 4.x and Visual Studio 2015
    -My posts after 11/2011 = .NET 4.x and Visual Studio 2012
    -My posts after 02/2010 = .NET 4.0 and Visual Studio 2010
    -My posts after 12/2007 = .NET 3.5 and Visual Studio 2008
    -My posts after 04/2007 = .NET 3.0 and Visual Studio 2005
    -My posts before 04/2007 = .NET 1.1/2.0

    *I do not follow all threads, so if you have a secondary question, message me.

  4. #4
    Join Date
    Feb 2000
    Location
    OH - USA
    Posts
    1,892

    Arrow Re: run exe

    Beat me to it.
    Good Luck,
    Craig - CRG IT Solutions - Microsoft Gold Partner

    -My posts after 08/2015 = .NET 4.x and Visual Studio 2015
    -My posts after 11/2011 = .NET 4.x and Visual Studio 2012
    -My posts after 02/2010 = .NET 4.0 and Visual Studio 2010
    -My posts after 12/2007 = .NET 3.5 and Visual Studio 2008
    -My posts after 04/2007 = .NET 3.0 and Visual Studio 2005
    -My posts before 04/2007 = .NET 1.1/2.0

    *I do not follow all threads, so if you have a secondary question, message me.

  5. #5
    Join Date
    Jul 2006
    Posts
    21

    Re: run exe

    Thank u sir it is know working on the same PC.....now the problem is

    When I tried to run the exe on different system by copying the bin directory it is giving the exception like this……

    System.argument out of range exception as occured in the application.exe

  6. #6
    Join Date
    Feb 2000
    Location
    OH - USA
    Posts
    1,892

    Arrow Re: run exe

    - Look at the Stack Trace in the error message and then map that to your code.
    - Determine what has changed between one location and another.

    Again,
    Quote Originally Posted by Craig Gemmill
    I'm willing to bet that your problem is the result of a missing dependency
    Good Luck,
    Craig - CRG IT Solutions - Microsoft Gold Partner

    -My posts after 08/2015 = .NET 4.x and Visual Studio 2015
    -My posts after 11/2011 = .NET 4.x and Visual Studio 2012
    -My posts after 02/2010 = .NET 4.0 and Visual Studio 2010
    -My posts after 12/2007 = .NET 3.5 and Visual Studio 2008
    -My posts after 04/2007 = .NET 3.0 and Visual Studio 2005
    -My posts before 04/2007 = .NET 1.1/2.0

    *I do not follow all threads, so if you have a secondary question, message me.

  7. #7
    Join Date
    Jul 2006
    Posts
    21

    Re: run exe

    Plz tell clearly iam very new to VB iam not an expert to bet with u.........

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