The system cannot execute the specified program. RRS feed

  • Question

  • Trying to get an automated build process working on a local admin account. Part of the process involves running a UWP app through a command line interface (MsixPackagingTool CLI) with elevated privileges.

    I have a script set up such that I can run it and everything works fine, however when my build process runs the exact same script (called in the same manner) running on the same user account I run into the error "The system cannot execute the specified program."

    The event viewer also gives me this error 0x80070520: Cannot create the process for package Microsoft.MsixPackagingTool_1.2019.701.0_x64__8wekyb3d8bbwe because an error was encountered while configuring runtime. [FinishPackageActivation] ErrorCode 2147943712
    Tuesday, October 1, 2019 6:02 PM


  • Figured it out! 
    For anyone else coming across this issue...

    Turns out the issue was due to my Jenkins opening cmd as the SYSTEM user. UWP seems to install what are essentially "shortcuts" in the local user's AppData (AppData\Local\Microsoft\WindowsApps). The problem is that the SYSTEM user does not have access to execute another user's "shortcut". I solved this problem by instead calling the global installation of the UWP app under C:\Program Files\WindowsApps. I did however have to re-assign ownership of the WindowsApps folder to get it working.

    • Marked as answer by Jesse Flello Tuesday, October 1, 2019 10:38 PM
    Tuesday, October 1, 2019 10:30 PM