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. Uninstallation failed from Apps -> Installed Aps in Windows 11
Forum Updated to NodeBB v4.3 + New Features

Uninstallation failed from Apps -> Installed Aps in Windows 11

Scheduled Pinned Locked Moved Unsolved Installation and Deployment
1 Posts 1 Posters 175 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
    Alhano
    wrote on last edited by
    #1

    Hello,

    I'm writing an installed application for a Qt application.
    The Qt version I use is 6.7.2.
    The Qt installation framework is 4.8.

    Here's my config.xml.
    It's set up for the application to be installed C:\Program Files.

    <?xml version="1.0" encoding="UTF-8"?>
    <Installer>
    <Name>Company Product</Name>
    <Version>1.0.0</Version>
    <Title>Company Product Installed</Title>
    <Publisher>Company</Publisher>
    <StartMenuDir>Company\Product</StartMenuDir>
    <TargetDir>@ApplicationsDir@/@Publisher@/Product</TargetDir>
    </Installer>

    A package.xml file.
    <?xml version="1.0" encoding="UTF-8"?>
    <Package>
    <DisplayName>Company Product</DisplayName>
    <Description>This installs Company Product.</Description>
    <Version>1.0.0</Version>
    <ReleaseDate>2024-09-17</ReleaseDate>
    <Default>script</Default>
    <Script>installscript.qs</Script>
    </Package>

    And an installscript.qs file.

    *function Component() {}

    Component.prototype.createOperations = function()
    {
    component.createOperations();

    if (systemInfo.productType === "windows")
    {
        var targetDir    = installer.value("TargetDir");
        var startMenuDir = installer.value("StartMenuDir");
    
        component.addOperation("CreateShortcut",
    		targetDir + "/company_program.exe",
    		startMenuDir + "/Company Program.lnk",
                    "iconPath=" + targetDir + "/company_program.ico");
    		
        component.addOperation("CreateShortcut",
    		targetDir + "/maintenancetool.exe",
    		startMenuDir + "/Uninstall Company Program.lnk");
    }
    

    }*

    The problems I have right now are:

    • The applications shortcuts are installed for the current user.
    • The registry for uninstaller are written HKCU not HKLM.

    Removing the application works from its shortcuts in the Start menu, from a console and from the Windows explorer.
    But it doesn't when running the Apps > Installed Aps in Windows 11.
    When trying from there, there's a Windows that popups very quicky and nothing is uninstalled.

    So I believe may come from user rights:

    • The application is installed under C:\Program Files.
    • Shortcut menu are installed for the current user.
    • Registries for uninstalling are defined in HKCU.

    So I'ld like to have:

    • Application is installed under C:\Program Files.
    • Shortcut menu installed for all users.
    • Registries for uninstalling defined in HKLM.

    How can I perform this setup?

    Thanks.

    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