No announcement yet.

Program only runs compiled if renamed

  • Filter
  • Time
  • Show
Clear All
new posts

  • Program only runs compiled if renamed

    If I rename an exe it runs fine.
    If I copy to another machine it runs fine.
    If I run on local machine it just ends without any error.
    What would cause this, a corrupt registry?
    Anyone know how to fix this?
    Saw this happen a few years ago with a DOS program.

  • #2
    are you sure you are running the same program - you might need a full path or to launch from Windows Explorer to be certain. Could be you are running another exe of the same name in the %PATH%.


    • #3
      No. I've even gone to the command prompt.
      Good suggestion. I'll look for another occurrance of the same name.


      • #4
        Otherwise maybe a dll version issue or a hardware problem - display adaptor, printer configuration, etc or the exe either can't get a resource which it needs on your PC or it can't get enough of it or maybe it can't read memory at a particular address or ...


        • #5
          I'm going through executables with a hex editor.


          • #6
            Deleting manifest file fixed it.

            There was a program named MyProgram.Exe.Manifest
            Deleted it and runs immediately.

            Thanks, Chris. You pointed me in the right direction.

            It appears I was using a manifest and didn't know it.
            Now need to read about manifests to see what went wrong.
            Strange thing is it was just another compile. Obviously, not.


            • #7
              I am not sure what Manifests have to do with it, because to date I have never used one.

              But did you mean you compile and run once, and your program just closes? or did you mean "It works once, but if I compile and run again, I get a Destination file error?"

              I would find it EXTREMELY hard to believe it could be "I compile, but do NOT run" and then Run the EXE itself but it will not run until I rename the EXE???
              Engineer's Motto: If it aint broke take it apart and fix it

              "If at 1st you don't succeed... call it version 1.0"

              "Half of Programming is coding"....."The other 90% is DEBUGGING"

              "Document my code????" .... "WHYYY??? do you think they call it CODE? "


              • #8
                Program always compiled and ran.
                It started terminating upon execution making only a windows sound.


                • #9
                  Mike, Dunno if this will help but when fooling around with pointers the other day, a similar thing happened here (only on one machine though, didn't try it on others). What I *think* it was
                  Dimming Array(1 to ...)
                  then assigning ArrayPtr = VarPtr(array(0)).

                  When I assigned ArrayPtr = VarPtr(Array(1)), the problem went away. Probably has nothing to do with your problem, but the result was the same (Compile, Run & Exit immediately)

                  "There is a country in Europe
                  where multiple-choice tests are illegal."
                  Sigfried Hulzer
                  Last edited by Gösta H. Lovgren-2; 8 Nov 2008, 11:32 PM. Reason: Major correction - got my zeroes and ones mixed up
                  It's a pretty day. I hope you enjoy it.


                  JWAM: (Quit Smoking):
                  LDN - A Miracle Drug: