Important: Please read the Qt Code of Conduct -

QtService data location

  • Hi,
    I'm developing QtService. It will run on Windows under Local System account. The service needs to save some data somewhere. What standard location to use for saving data?

    The service is accompanied with GUI application (it will run with standard privileges under users account) which needs to access that data also.

  • Lifetime Qt Champion


    Do you already know QStandardPaths ? You have there a table that should help define the correct path to use depending on what type data you'll have to save.

    Hope it helps

  • For standard GUI application I normally use QStandardPaths::GenericDataLocation. For QtService application under Local System account this path points to C:/WINDOWS/system32/config/systemprofile/AppData/Local on Win10. I think this is not suitable location for storing data.

Log in to reply