Packaged executable error on run (win64)

When we package our projects everything seems to run fine with no warnings. However the executable doesn’t have the proper icon, and when run it returns “This program is used for packaged games and is not meant to be run directly”


This is how the file looks:


We managed to fix this problem temporarily by creating a new project and migrating the content. After one successful build the issue returns, and re-migrating is required again. Obviously this is a time consuming fix.

Thank you for any suggestions.

Extra Info:

  • Running version 4.10.1.
  • Packaging in win64bit.
  • Tried 32bit but same problem.
  • Tried packaging to different drive.
  • Also tried changing between
    “shipping” and “development”
1 Like

We found that copying the project from the Z:Drive to the C:Drive and packaging from there works.

To confirm, it’ll run a single time successfully from the Z:Drive, then subsequent packages have the error until the project is migrated.

Copying to the C:Drive allows the project to consistently package correctly, but we want to keep the project on the Z:Drive if possible.

It may be an issue with our drive setup rather than the engine.

Hello AlexJG,

What is the resulting file path after you package to the Z: drive? Is it directly to the Z: drive or in a certain directory? Are there only two drives in your computer? If not, do any of the other drives that are not the C: or Z: act in this way? Also, is the Z: drive an external hard drive?

Hi Matthew thanks for replying,

We’re packaging from the Z:Drive to the C:Drive. The editor doesn’t give us an option for packaging to the Z:Drive.

The Z:Drive is a shared network drive, though I’m not 100% on how it works/is set up.

Hm, it seems like the .exe might be having problems overwriting the old version. From the picture you provided, it seems like it hadn’t been updated in over a month, while the other folders had. You also claim that it works the first time but then doesn’t work on subsequent packaging attempts. To test this, could you try deleting the .exe from the directory and then packaging to that same directory again?

Good spot Matthew, that file was definitely packaged to a brand new directory on the day I posted the question; it shouldn’t be showing Jan on the Date Modified tab. I don’t know what that means but it seems likely to be relevant.

It seems like this may be an issue with the drive setup as you previously mentioned, especially if the Z: drive is a virtual drive. Have you been able to try packaging to the same directory after deleting the executable from the previous version to see if it works correctly then?

Thanks Matthew, yes we just tested it out and it’s still says the new executable was made in January. I think we’re going to just use the “copy to C:Drive” fix for now. Thanks very much for all your help

try to package into physically the other disk. i work for me at the very first try. nice tips. thx~