Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Can't find ProgramData folder for windows.

Can't find ProgramData folder for windows.

Scheduled Pinned Locked Moved General and Desktop
4 Posts 3 Posters 1.9k Views
  • 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.
  • N Offline
    N Offline
    nikitablack
    wrote on 30 Jan 2015, 15:14 last edited by
    #1

    Greetings,

    I want to locate a ProgramData (or C:\Documents and Settings\All Users\Application Data). I'm using QStandardPaths class. I tried a bunch of different StandardLocations. But I always have C:/Users/myuser/... folder, i.e. not public folder. Currently I'm using windows API for that, but maybe I'm just doing something wrong.

    Qt 5.4.0, Win7.

    1 Reply Last reply
    0
    • A Offline
      A Offline
      andre
      wrote on 30 Jan 2015, 15:37 last edited by
      #2

      Some of these functions should return more than one item. Does none of them contain the path you need?

      1 Reply Last reply
      0
      • N Offline
        N Offline
        nikitablack
        wrote on 30 Jan 2015, 16:09 last edited by
        #3

        That's right, no one.

        1 Reply Last reply
        0
        • H Offline
          H Offline
          hskoglund
          wrote on 30 Jan 2015, 22:45 last edited by
          #4

          Hi, I also tried Qt for that directory, but alas, you have to venture into the bowels of Windows:
          @
          #include "shlobj.h"
          @

          then:
          @
          TCHAR szPath[MAX_PATH];
          SHGetFolderPath(NULL,CSIDL_COMMON_APPDATA,NULL,0,szPath);
          QString sCommonAppData = QString::fromWCharArray(szPath);
          @

          1 Reply Last reply
          0

          1/4

          30 Jan 2015, 15:14

          • Login

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