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. Qt Installer Framework - <AdminTargetDir> doesn't work
QtWS25 Last Chance

Qt Installer Framework - <AdminTargetDir> doesn't work

Scheduled Pinned Locked Moved General and Desktop
2 Posts 1 Posters 917 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.
  • A Offline
    A Offline
    alex.araratyan
    wrote on last edited by
    #1

    Can someone explain how <AdminTargetDir> works in config.xml file. The documentation is very poor in this regard.

    My understanding was that if user running installer has Admin rights then <AdminTargetDir> directory should appear as a default installation directory, otherwise if user running installer doesn't have admin rights then <TargetDir> directory should appear as a default installation directory.

    But after many experiments I figured out that for both regular and admin users only <TargetDir> directory appears as a default installation directory.

    Can someone clarify what is going on and how <AdminTargetDir> should work.

    1 Reply Last reply
    0
    • A Offline
      A Offline
      alex.araratyan
      wrote on last edited by
      #2

      Since no one replied to this thread I had to look into sources of QIF and here is what I found out in packagemanagercore_p.cpp file:

      @#ifdef Q_OS_LINUX
      if (m_launchedAsRoot)
      m_data.setValue(scTargetDir, replaceVariables(m_data.settings().adminTargetDir()));
      #endif@

      So it works properly only on Linux. So why it is not supported on Windows?
      I think when installer run as Administrator ("Run as administrator") on Windows then <AdminTargetDir> value should be used. Is it a bug?

      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