Launch from Windows installer fails to drop privileges
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Be nice to others! Respect the FreeCAD code of conduct!
Re: Launch from Windows installer fails to drop privileges
I do not believe the exact history was ever spelled out. However, the steps to reproduce were stated a few weeks ago
*****
To reproduce:
- Download the 0.19 Windows 10 64-bit installer executable from FreeCAD
- Run the installer, approve Administrator, install to Program Files, tick the "Launch" checkbox at the end of the installer
- FreeCAD now running as Administrator
*****
Only people with Administrator credentials can do this. The entire complaint is based around some innocent ordinary user getting all confused and creating security problems.
Utterly impossible for ordinary users. Administrators should know how the system works.
Enough for me.
Gene
*****
To reproduce:
- Download the 0.19 Windows 10 64-bit installer executable from FreeCAD
- Run the installer, approve Administrator, install to Program Files, tick the "Launch" checkbox at the end of the installer
- FreeCAD now running as Administrator
*****
Only people with Administrator credentials can do this. The entire complaint is based around some innocent ordinary user getting all confused and creating security problems.
Utterly impossible for ordinary users. Administrators should know how the system works.
Enough for me.
Gene
Re: Launch from Windows installer fails to drop privileges
The problem is recognized in the FreeCAD source code comments, along with the solution I've mentioned twice before -- fork a separate process to do the Admin escalation and install, then go ahead and launch in the original process.
My response to the bewildering rationalization in the problem report is 'It is definitely a bug. The installer does not behave like all others as claimed -- name one. The launch button is currently not a convenience, but an inconvenience and a disservice to all new FreeCAD Windows users because it leads to unexpected trouble as described in the forum. The user expectation is not to "check if it went fine", but to use the program immediately. Admins rarely install this program; users do. Running an process that temporarily escalates privileges does not reclassify the physical human to be an IT Admin any more than the Unix "passwd" command does. New users to FreeCAD are subject to this installer and wouldn't know not to use the Launch button "feature" because they have never seen another installer broken like this.'
uwestoehr, haven't you worked on the gpg4win installer? It works correctly.
Re: Launch from Windows installer fails to drop privileges
+1
Exactly.
And for the last time: The installer provides you an option, if you don't want it, don't use it. I will not remove an optional feature just because some users might want to not use it. That's why the feature is optional and not mandatory.
Re: Launch from Windows installer fails to drop privileges
Only sort of.
An ordinary Win user buys a new PC, fires it up, adds a username and password (or not). This user has admin privileges, that's why the installer can elevate privileges.
I don't know how easy/hard it is to elevate and de-elevate privileges with NCIS (this is what is used to build the installer)
I'm not against de-elevating the permissions, I'm leaning this way. Or an annoying pop-up that says "are you sure".
@uwestoehr, do you know how hard it would be to de-elevate privileges?
I think most Win users don't appreciate the privileges, similar to the indiscriminate use of sudo on Linux.
"fight the good fight"
Re: Launch from Windows installer fails to drop privileges
From a technical standpoint, I don't think core NSIS supports this directly, but this plugin seems to allow it.
Re: Launch from Windows installer fails to drop privileges
Thanks!
There may be some "Limitations"
Uwe, what do you think? From a "least privileges" point of view, could be an option?
"fight the good fight"
Re: Launch from Windows installer fails to drop privileges
This is then no elevation. Then the user is already admin, so nothing is elevated - there is then only one level, the admin level. Therefore you will then not have to enter an admin password because your account is the admin.
Nobody forces you to use an optional feature you don't like and I will not remove an optional feature that was built in purposely since some users need/like this. And of course the run FC after installation button was and is meant to be run by the Win user who executed the installer, not someone else.
And also for the last time: the installer is just an executable like every other program. Run the cmd.exe with admin privileges. Then start e.g. the python.exe from this and Python has admin privileges. Windows just follows your will - you wanted the admin level and you get it. If you don't want admin level, then just don't request them.
I won't comment on this anymore. Everything is said and I am not responsible to explain admins their rights and duties on their OS.
(The thread here appears to me like "I requested admin privileges and now I have them but I don't wanted them".)
Re: Launch from Windows installer fails to drop privileges
This would contradict the idea of the option to run FC _from within the installer_. This feature is that the user who run the installer will run FC.chennes wrote: ↑Thu Sep 16, 2021 8:44 pm From a technical standpoint, I don't think core NSIS supports this directly, but this plugin seems to allow it.
If you want to install FC for all users and run FC afterwards as non-admin user, just end the installer (since the installation is over) then start FC the normal way from your user account.
Re: Launch from Windows installer fails to drop privileges
This is incorrect. The user is not admin when they run the installer, they are not asking to run FreeCAD itself as Admin as in your bogus example of cmd.exe, and there is privilege escalation though standard UAC for the installer not FreeCAD. I don't think you understand this from a user's perspective rather than a developer or administrator.
You have improperly closed a real and important bug based on an odd opinion without addressing any of the points made. I'm left feeling there is no point in reporting any more bugs if such an incredibly basic one takes so much effort, only to get dismissed in such a manner, with other developers in approval of such nonsense.
Re: Launch from Windows installer fails to drop privileges
Let's stay factual. I will get a Windows computer with a standard installation and document what I see from a user's perspective who makes a first time install.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.