HELP! Any way to suppress UAC in installation

English support forum

Moderators: Hacker, petermad, Stefan2, white

Post Reply
KozakMak
Power Member
Power Member
Posts: 509
Joined: 2021-05-24, 12:39 UTC
Location: UA

HELP! Any way to suppress UAC in installation

Post by *KozakMak »

With

Code: Select all

tc*.exe /I0".\"RSHG0D0 ".\totalcmd"
I only unpack totalcmd.
But this operation trigger UAC!
This is absolutely should not be in a portable use case! Help me get rid of this :evil:
OS: Win10 | TC: latest x64
User avatar
nsp
Power Member
Power Member
Posts: 1959
Joined: 2005-12-04, 08:39 UTC
Location: Lyon (FRANCE)
Contact:

Re: HELP! Any way to suppress UAC in installation

Post by *nsp »

I use a bat file installSilentTC.bat :

Code: Select all

@echo off
REM Silent Install TC
SET __COMPAT_LAYER=RunAsInvoker
tc*.exe /A1I0".\"RSHG0D0L1M0K %1 
I call installSilentTC <destination folder>.

It should also be possible to create a dedicated manifest file for tc*exe...

see https://woshub.com/run-program-without-admin-password-and-bypass-uac-prompt/#h2_4
User avatar
Dalai
Power Member
Power Member
Posts: 10042
Joined: 2005-01-28, 22:17 UTC
Location: Meiningen (Südthüringen)

Re: HELP! Any way to suppress UAC in installation

Post by *Dalai »

If you intend to install/update a portable TC it may be easier to just extract the installer (and the install.cab contained within) with 7-zip or similar.
#101164 Personal licence
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64

Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
KozakMak
Power Member
Power Member
Posts: 509
Joined: 2021-05-24, 12:39 UTC
Location: UA

Re: HELP! Any way to suppress UAC in installation

Post by *KozakMak »

2nsp
:shock:
GOD BLESS YOU!
OS: Win10 | TC: latest x64
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50934
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: HELP! Any way to suppress UAC in installation

Post by *ghisler(Author) »

The installer is set to "highestAvailable", so when you run it as an unprivileged user, it will install without UAC as far as it gets. If the user chooses a protected directory, it asks for UAC consent.
Author of Total Commander
https://www.ghisler.com
KozakMak
Power Member
Power Member
Posts: 509
Joined: 2021-05-24, 12:39 UTC
Location: UA

Re: HELP! Any way to suppress UAC in installation

Post by *KozakMak »

ghisler(Author) wrote: 2025-06-18, 09:49 UTC so when you run it as an unprivileged user, it will install without UAC as far as it gets.
Just try /I0".\"RSHG0D0 ".\totalcmd" -- and get UAC prompt!
I don't understand why? The user just wants to unpack in HIS folder and that's it.
OS: Win10 | TC: latest x64
User avatar
nsp
Power Member
Power Member
Posts: 1959
Joined: 2005-12-04, 08:39 UTC
Location: Lyon (FRANCE)
Contact:

Re: HELP! Any way to suppress UAC in installation

Post by *nsp »

ghisler(Author) wrote: 2025-06-18, 09:49 UTC The installer is set to "highestAvailable", so when you run it as an unprivileged user, it will install without UAC as far as it gets. If the user chooses a protected directory, it asks for UAC consent.
In fact:
if the current user have admin right, installer always ask for UAC even to install to non protected folders.
If you force runAsInvoker you get a really silent install without this boring uac dialog !.
KozakMak
Power Member
Power Member
Posts: 509
Joined: 2021-05-24, 12:39 UTC
Location: UA

Re: HELP! Any way to suppress UAC in installation

Post by *KozakMak »

nsp wrote: 2025-06-18, 11:37 UTC In fact:
if the current user have admin right, installer always ask for UAC even to install to non protected folders.
move to bug reports plz
OS: Win10 | TC: latest x64
User avatar
Dalai
Power Member
Power Member
Posts: 10042
Joined: 2005-01-28, 22:17 UTC
Location: Meiningen (Südthüringen)

Re: HELP! Any way to suppress UAC in installation

Post by *Dalai »

KozakMak wrote: 2025-06-20, 12:58 UTC
nsp wrote: 2025-06-18, 11:37 UTC In fact:
if the current user have admin right, installer always ask for UAC even to install to non protected folders.
move to bug reports plz
Well, it's expected behavior when an executable's manifest is set to highestAvailable. The same happens with regedit.exe - it always triggers a UAC prompt when the user is a member of the Administrators group (and the parent process isn't already running elevated).

These are the levels possible:
  • requrieAdministrator
    Always triggers a UAC prompt, regardless of group membership. If the user is not a member of the Administrators group, it will require the user to input the correct credentials of a user that is a member of that group.
  • asInvoker
    Always run programs with the token they have, be it regular or elevated (if the parent process is running elevated).
  • highestAvailable
    Triggers a UAC prompt if the user is a member of the Administrators group (and the parent process is not already running elevated). There will be no prompt if the user is not a member of that group.
So, pick ypour poison. Using any one of these levels has its pros and cons. And as Ghisler pointed out here seven years ago, it's not easy and quick to change the installer:
ghisler(Author) wrote: 2018-06-25, 10:36 UTC Currently the installer uses level="highestAvailable", so non-admin users can still install TC to a directory like c:\Totalcmd, which does not require admin rights.

It would be better to first collect user data with normal rights and then ask for admin rights. Unfortuantely this would require a lot of changes, so I cannot add it quickly.
PS: As I said previously: Use an archiver if you need to update a portable TC, especially if you don't let the installer create any shortcuts or write to the registry.
#101164 Personal licence
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64

Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
Post Reply