TC installation without admin rights

English support forum

Moderators: Hacker, petermad, Stefan2, white

Post Reply
User avatar
Valentino
Power Member
Power Member
Posts: 709
Joined: 2003-02-07, 00:21 UTC
Location: Ukraine

TC installation without admin rights

Post by *Valentino »

Recently I discovered that TC installer needs admin rights. I agree with MVV in this old thread that installer should elevate itself only when it really needs it.
For example, I successfully installed Firefox without admin rights but could not do this with TC :(
I know I can unpack the package manually but it's workaround.
Firefox discovered itself that it cannot write to Program Files and suggested User folder as default destination. It would be user friendly if TC installer could do the same.
User avatar
MVV
Power Member
Power Member
Posts: 8711
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

Installer has setting that cause Windows to ask for elevation if it may be asked. You can edit install.exe's manifest in resources or simply start TC installation from console with special environment variable defined, or you can use simple batch file:

Code: Select all

@set __COMPAT_LAYER=RunAsInvoker
@start "" tcm801x32_64.exe
This tells to Windows not to ask for elevation even if manifest tells that it is required.
User avatar
Valentino
Power Member
Power Member
Posts: 709
Joined: 2003-02-07, 00:21 UTC
Location: Ukraine

Post by *Valentino »

2MVV
Thanks! Didn't know that. But anyway it's another workaround. I would suggest to make TC installer more clever. I should have created this topic in suggestions forum...
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50930
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Sorry, Windows only supports 3 options in the manifest:
1. requireAdministrator: Windows will always require admin rights
2. asInvoker: Windows will never require admin rights
3. highestAvailable: Windows will request admin rights only if the user doesn't need to enter a password

install.exe uses highestAvailable. The self-extracting installer uses requireAdministrator. So if you want to install TC on a restricted account and don't have admin rights, rename the self-extractor to something like tcm801x32.zip, unpack it, and then run install.exe.
Author of Total Commander
https://www.ghisler.com
User avatar
MVV
Power Member
Power Member
Posts: 8711
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

ghisler(Author),
You may simply set asInvoker for both and learn installer to start itself with elevation if need (using ShellExecuteEx with "runas" verb).
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50930
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

What would be the advantage?
Author of Total Commander
https://www.ghisler.com
User avatar
MVV
Power Member
Power Member
Posts: 8711
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

Less annoying UAC popups if they aren't necessary. :) E.g. if user installs TC into writeable folder and unchecks options for all users.

Some users (me too) don't like when some program asks for elevation when it doesn't need it.
djgregory
New Member
New Member
Posts: 1
Joined: 2012-09-19, 08:43 UTC
Location: Russland

Post by *djgregory »

I'm new to TC... isn't it a solution - just using portable version?
User avatar
Valentino
Power Member
Power Member
Posts: 709
Joined: 2003-02-07, 00:21 UTC
Location: Ukraine

Post by *Valentino »

ghisler(Author) wrote:What would be the advantage?
It's not obvious that user may rename self-extracting installer to install TC on restricted account, so such users have to:
1. Google for solution to this problem, find this thread and read it.
2. Bother to follow described steps.

It would be nice if TC detected that it cannot install itself or config files to specified directories without elevation and proposed two choices to user:
1. Select other directories.
2. Continue with elevation ("Continue" button with shield).
Post Reply