Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. Cannot write to file: Unknown error after clean install of Qt
Forum Updated to NodeBB v4.3 + New Features

Cannot write to file: Unknown error after clean install of Qt

Scheduled Pinned Locked Moved Unsolved Installation and Deployment
18 Posts 7 Posters 2.9k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • johnratiusJ Offline
    johnratiusJ Offline
    johnratius
    wrote on last edited by
    #5

    @hskoglund
    I tried a new user and it installed and runs correctly. Since I installed it to the C:\ directory, I tried running it on my normal account and I continue to get the errors. Any suggestions?

    1 Reply Last reply
    0
    • hskoglundH Offline
      hskoglundH Offline
      hskoglund
      wrote on last edited by
      #6

      The easiest is just to nuke the whole directory C:\Users\John\AppData\Roaming\QtProject
      (equivalent to creating a new user in Windows 10 from Qt Creator's point of view)

      Note: perhaps zip the directory first in case there are some settings you want to resurrect from the nuking

      1 Reply Last reply
      2
      • johnratiusJ Offline
        johnratiusJ Offline
        johnratius
        wrote on last edited by
        #7

        I tried that before and I kept getting the error. I ended up just reinstalling windows for a clean installation. It now works fine.

        1 Reply Last reply
        0
        • johnratiusJ Offline
          johnratiusJ Offline
          johnratius
          wrote on last edited by
          #8

          Reinstalling Windows was a temporary fix. I installed all my regular programs back and tried to run Qt Creator and got the same errors.

          mrjjM 1 Reply Last reply
          0
          • johnratiusJ johnratius

            Reinstalling Windows was a temporary fix. I installed all my regular programs back and tried to run Qt Creator and got the same errors.

            mrjjM Offline
            mrjjM Offline
            mrjj
            Lifetime Qt Champion
            wrote on last edited by
            #9

            @johnratius said in Cannot write to file: Unknown error after clean install of Qt:

            regular programs

            Hi does these regular programs include any kind of anti virus software ?

            1 Reply Last reply
            1
            • johnratiusJ Offline
              johnratiusJ Offline
              johnratius
              wrote on last edited by johnratius
              #10

              @mrjj Only Malwarebytes. But I have already disabled it and tried running it before and the issue still arises. When Qt Creator ran successfully after my clean Windows re-install, Malwarebytes was already installed. Since then, other software such as Microsoft Visual C++ Redistributables were installed as well as OBS, Git, MS Office, music software, etc... I even disabled windows Firewall and still got the errors. I don't think it's an anti-virus problem...

              I should add, though I have not used Qt Creator much and I used to program Qt in other IDEs, when creating a project now, all Qt includes are not recognized or not found. In any new or old project. I have no idea why Qt Creator can't read the path to bin. (adding to path to system variables has not worked, though I have not tried adding every bin directory, just the ones I use)

              I found these:
              https://stackoverflow.com/questions/7530111/qt-creator-cannot-create-file-qtcreator-xml-mac/8820193
              https://askubuntu.com/questions/253785/cannot-overwrite-file-home-baadshah-config-qtproject-qtcreator-toolchains-xml

              but I am not familiar enough with Linux to translate these commands over to test them. I also installed Qt with all the correct permissions I thought it needed which worked for a little while.

              1 Reply Last reply
              0
              • johnratiusJ Offline
                johnratiusJ Offline
                johnratius
                wrote on last edited by
                #11

                Would it be possible that other software on my computer conflicts with Qt?

                mrjjM 1 Reply Last reply
                0
                • johnratiusJ johnratius

                  Would it be possible that other software on my computer conflicts with Qt?

                  mrjjM Offline
                  mrjjM Offline
                  mrjj
                  Lifetime Qt Champion
                  wrote on last edited by
                  #12

                  @johnratius
                  Hi
                  yes but its normal scanner software or other file checkers as Creator has its on profile etc so
                  not sure how another app could prevent it from writing etc.

                  Also it worked when windows was more clean and then it stopped so it does seems like something you installed after does something but I have no guesses.

                  1 Reply Last reply
                  1
                  • johnratiusJ Offline
                    johnratiusJ Offline
                    johnratius
                    wrote on last edited by johnratius
                    #13

                    So after many days weeks of checking each program I install after a reset, I found the perpetrator.

                    I have a bin directory in my C drive containing a script with a bunch of doskey commands so I can use common bash commands.

                    Upon adding this script with my registry script:

                    Windows Registry Editor Version 5.00
                    
                    [HKEY_CURRENT_USER\SOFTWARE\Microsoft\Command Processor]
                    "AutoRun"=hex(2):43,00,3a,00,5c,00,62,00,69,00,6e,00,5c,00,73,00,74,00,61,00,\
                      72,00,74,00,75,00,70,00,2e,00,62,00,61,00,74,00,00,00
                    

                    Qt Creator throws this error.

                    What the above script does is this and only this:

                    registry editor pic
                    Makes sure the Command Processor folder is there, adds an AutoRun REG_EXPAND_SZ with the value to my script C:\bin\startup.bat

                    From what I remember, I can do this manually and Qt still crashes on start.

                    I do love my bash commands and would like to have them with Qt Creator. Is this a bug? If there is a workaround, that would be amazing.

                    Time to restore my computer to before I installed the script sigh...

                    1 Reply Last reply
                    1
                    • hskoglundH Offline
                      hskoglundH Offline
                      hskoglund
                      wrote on last edited by
                      #14

                      Hi, I think the culprit might be one of the bash commands in that startup.bat file causing a name collision.
                      First guess would be: is one of those bash commands called toolchains?

                      1 Reply Last reply
                      3
                      • johnratiusJ Offline
                        johnratiusJ Offline
                        johnratius
                        wrote on last edited by
                        #15

                        That would be my guess too but no. This is all I have in my bash commands.

                        @echo off
                        cls
                        doskey ls=dir /W $*
                        doskey touch=copy NUL $* 1>NUL
                        doskey up=cd.. $*
                        doskey ip=ipconfig $*
                        doskey rm=del /Q /F $* > NUL
                        doskey rmd=rmdir /Q /S $*
                        doskey clear=cls
                        cls
                        

                        Note: This the above runs whenever I start a CMD window the way the registry script is installed.

                        1 Reply Last reply
                        0
                        • F Offline
                          F Offline
                          fifthfloor
                          wrote on last edited by
                          #16

                          I installed Qt 6.0.0 today and I'm getting the same error on every startup of Qt Creator 4.14.0.
                          There was Qt 5.15 with a previous version of QtCreator installed, which I removed before.
                          Deleting the complete directory \users...\QtProject did not help.

                          I don't have a script like @johnratius nor a registry entry like this.
                          But I found a similar report for a ubuntu environment here:

                          https://bugreports.qt.io/browse/QTCREATORBUG-20880

                          The conclusion there is that some third party library has an influence.

                          1 Reply Last reply
                          0
                          • M Offline
                            M Offline
                            maxim2511
                            wrote on last edited by
                            #17

                            I have this same problem. On Gentoo linux I have installed Qt 6.3 on seperate disk, and from there I am launching app, and that disk is not part of the system, and I have privileges problem on folders and files, every time when folder or file was updated, they was changing owner rights, and I need go step by step and rewrite rights to be on my user account, and ( to be sure that everything go wright ) I set files accessible to everyone. Read, write, and execute.

                            1 Reply Last reply
                            0
                            • B Offline
                              B Offline
                              BlasQt
                              wrote on last edited by
                              #18

                              Same problem here, running Qt Creator 15.0.1 on windows 11

                              1 Reply Last reply
                              0

                              • Login

                              • Login or register to search.
                              • First post
                                Last post
                              0
                              • Categories
                              • Recent
                              • Tags
                              • Popular
                              • Users
                              • Groups
                              • Search
                              • Get Qt Extensions
                              • Unsolved