Windeployqt won't run, “Access is denied.”

  • I'm trying to deploy a Qt application, but every time I try to run windeployqt.exe I get the "This app can't run on your PC, to find a version for your PC contact the publisher" windows popup and it says "Access is denied." in the console. Here's my deployment script, running in the VS 2017 Developer CMD. I don't get errors for anything else so I'm pretty sure qmake and nmake are working correctly.

    call "C:\Program Files (x86)\Microsoft Visual Studio\...\vcvars64.bat"
    call C:\Qt\5.13.1\msvc2017_64\bin\qtenv2.bat
    C:\Qt\5.13.1\msvc2017_64\bin\qmake.exe CONFIG+=release [path to .pro]
    "C:\...\Microsoft Visual Studio\...\nmake.exe" [path to Makefile.Release]
    copy [path to my qt app executable] [output folder]
    cd [output folder]

    Windeployqt is in my PATH but it still won't run. This is my first time deploying a Qt app and I can't find any documentation that specifies that I need to do anything else before trying to run windeployqt. I have also checked relevant folder permissions and tried different output locations as well as a different drive. If any additional information is required please let me know.

  • Lifetime Qt Champion

    Hi and welcome to devnet,

    What version of Windows are you using ?
    Can you run your application from the same command prompt ?