locked
visual studio error RRS feed

  • Question

  • Hey guys when I run a program I wrote in class from USB it runs perfectly..when I use same code I get this:

     

    the system cannot find specified file

     

    Im also getting: 

    \documents\visual studio 2010\ projects] test\debug\test\test.exe is not recognized as an internal or external command, operable program or batch file.

     

    helpp!!!

     

    thanks

    Sunday, September 18, 2011 1:41 AM

Answers

  • Are you saying that it works when run in the computer where it was originally written, but fails after you transferred it to a memory stick?

    You should be using the memory stick as a storage device only. What happens if you transfer the program back to the hard drive of the computer where it was originally written? Does it work then?

    The error message you cite indicates that the project is looking for test.exe in a particular location on a hard drive (probably on the computer where you wrote it). That can happen if the solution was not properly saved in Visual Studio before transferring the solution folder to you memory stick.

    In future, you should always close Visual Studio BEFORE copying the solution folder to your alternate storage.

    • Proposed as answer by Alexander Sun Tuesday, September 20, 2011 9:43 AM
    • Marked as answer by Alexander Sun Tuesday, September 27, 2011 3:19 AM
    Sunday, September 18, 2011 2:19 PM
  • Hi Jonathan,

     

    Thank you for your post.

     

    From the error message:

    \documents\visual studio 2010\ projects] test\debug\test\test.exe is not recognized as an internal or external command, operable program or batch file.

    In short, it means you tried to run an executable that your OS could not find.

     

    If you ran this program in another computer from USB device, please copy your program files to the path error message mentioned. Probably, you change another environment, which lead to your program cannot find some files under the path mentioned.

     

    In addition, the .exe file needs to be in the current directory. If it's in a sub-folder, then you either need to use that in the path. You can refer to this page: http://social.msdn.microsoft.com/Forums/en-US/vcgeneral/thread/334c178b-7200-46aa-b9e2-80172e1b88dd

     

    If you have any other concerns, please feel free to let me know.

     

    Best Regards,


    Alexander Sun [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    • Marked as answer by Alexander Sun Tuesday, September 27, 2011 3:19 AM
    Wednesday, September 21, 2011 5:44 AM

All replies

  • Are you saying that it works when run in the computer where it was originally written, but fails after you transferred it to a memory stick?

    You should be using the memory stick as a storage device only. What happens if you transfer the program back to the hard drive of the computer where it was originally written? Does it work then?

    The error message you cite indicates that the project is looking for test.exe in a particular location on a hard drive (probably on the computer where you wrote it). That can happen if the solution was not properly saved in Visual Studio before transferring the solution folder to you memory stick.

    In future, you should always close Visual Studio BEFORE copying the solution folder to your alternate storage.

    • Proposed as answer by Alexander Sun Tuesday, September 20, 2011 9:43 AM
    • Marked as answer by Alexander Sun Tuesday, September 27, 2011 3:19 AM
    Sunday, September 18, 2011 2:19 PM
  • Hi Jonathan,

     

    Thank you for your post.

     

    From the error message:

    \documents\visual studio 2010\ projects] test\debug\test\test.exe is not recognized as an internal or external command, operable program or batch file.

    In short, it means you tried to run an executable that your OS could not find.

     

    If you ran this program in another computer from USB device, please copy your program files to the path error message mentioned. Probably, you change another environment, which lead to your program cannot find some files under the path mentioned.

     

    In addition, the .exe file needs to be in the current directory. If it's in a sub-folder, then you either need to use that in the path. You can refer to this page: http://social.msdn.microsoft.com/Forums/en-US/vcgeneral/thread/334c178b-7200-46aa-b9e2-80172e1b88dd

     

    If you have any other concerns, please feel free to let me know.

     

    Best Regards,


    Alexander Sun [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    • Marked as answer by Alexander Sun Tuesday, September 27, 2011 3:19 AM
    Wednesday, September 21, 2011 5:44 AM