From the download page you can get to here: https://github.com/FreeCAD/FreeCAD-Bund ... kly-builds but since there is no installer there this will not help in this case.
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
- Shalmeneser
- Veteran
- Posts: 9591
- Joined: Wed Dec 23, 2020 12:04 am
- Location: Fr
Re: Launch from Windows installer fails to drop privileges
v0.20 : Look at the bottom of Download page : "FreeCAD weekly builds page" link.
Re: Launch from Windows installer fails to drop privileges
As a followup, FreeCAD "installation" is very minimal compared to most programs.
* The main program is placed in the location of the user's choice. Default is Program Files, but not mandated.
* The user folders are setup in C:\\Users\#####\AppData\Roaming\FreeCAD.
* A start shortcut is established.
* A very small amount is added to the registry. The only thing FreeCAD uses in the registry is the window positions, sizes, and docking. The QT module puts those items in the registry.
If you have installed FreeCAD even once it will be no problem at all to use the non-install "unpack and run" development versions.
Gene
* The main program is placed in the location of the user's choice. Default is Program Files, but not mandated.
* The user folders are setup in C:\\Users\#####\AppData\Roaming\FreeCAD.
* A start shortcut is established.
* A very small amount is added to the registry. The only thing FreeCAD uses in the registry is the window positions, sizes, and docking. The QT module puts those items in the registry.
If you have installed FreeCAD even once it will be no problem at all to use the non-install "unpack and run" development versions.
Gene
Re: Launch from Windows installer fails to drop privileges
Thanks. It is a bug. I run as local admin and can't reproduce yet,curtmcd wrote: ↑Thu Aug 19, 2021 6:42 amThis is a bug report, not an attack on FreeCAD.Shalmeneser wrote: ↑Wed Aug 18, 2021 7:01 pmNo new user would try to install 0.18 and 0.19 in the same half hour.
You should try v0.20, it's even better !
I had installed 0.18 in March and forgotten about it. The 0.19 installer ran the 0.18, and also ran it as Administrator.
I would like to install 0.20, as the bug tracker web page says to post bugs for 0.20 only. Where do you get that?
0.20.xxxxx are dev versions that run without installation. They don't touch the registry, but do share the .cfg (and other) files in C:\\Users\#####\AppData\Roaming\FreeCAD. You just unzip them and run.
If in fact the installer gives FreeCAD admin privileges after install it's a big deal. Again I can't reproduce yet.
"fight the good fight"
Re: Launch from Windows installer fails to drop privileges
Thanks all.
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 (and possibly not 0.19 if more than one version is installed).
Since the bug is in the installer, to reproduce with 0.20 would require building the Windows release package. I'm sure the problem would still be there.sgrogan wrote: ↑Fri Aug 20, 2021 4:50 pmThanks. It is a bug. I run as local admin and can't reproduce yet,
0.20.xxxxx are dev versions that run without installation. They don't touch the registry, but do share the .cfg (and other) files in C:\\Users\#####\AppData\Roaming\FreeCAD. You just unzip them and run.
If in fact the installer gives FreeCAD admin privileges after install it's a big deal. Again I can't reproduce yet.
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 (and possibly not 0.19 if more than one version is installed).
Re: Launch from Windows installer fails to drop privileges
The FreeCAD executable file is always FreeCAD.exe, without any version identification. If the shortcut points to a location that contains FreeCAD.exe it will open whatever it finds.
It might be useful in the future to include some sort of forced uninstaller like occurs for some programs, but a lot of folks like to have more than one version installed.
Gene
Re: Launch from Windows installer fails to drop privileges
uwestoehr wrote: pinged by pinger macro
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
Re: Launch from Windows installer fails to drop privileges
Thanks.curtmcd wrote: ↑Fri Aug 20, 2021 7:29 pm 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 (and possibly not 0.19 if more than one version is installed).
So the question is this the desired behavior. From the GUI I would guess not. But from non-gui installation I can see a use case for, after granting FreeCAD admin as part of the installation, that starting FreeCAd as admin, too maybe set some prefs could be desirable.
At any rate, starting a previous version as admin doesn't make sense to me.
For Win users read the OP. It is only if you launch FreeCAD as part of the installation process, that the problem occurs. That tripped me up as well.
"fight the good fight"
Re: Launch from Windows installer fails to drop privileges
I am the author of the Win installer but have not yet understood the problem.
The installer allows you to install FC of al users of Windows or not. If you install only for the current users no admin privileges are necessary. To be able to install for all users, you need admin privileges. So when doing this from a user's account the installer correctly asks your for the admin password.
After the installation, you can start FC immediately. If you do this while having installed for al users, FC is started as being executed from your admin account of course. This makes sense since also as admin you might want to check if everything works fine.
(Note also that the admin account is designed in Windows as the one to install and organize things for all users, not to be used as a normal user. A least for security reasons this is even a no-go.)
You can also install FC without a GUI, by using the command line, see section 3.2 here: https://nsis.sourceforge.io/Docs/Chapte ... allerusage
(replace "installer.exe" by the name of the FC installer .exe)
What is in your opinion a bug that should be fixed?
The installer allows you to install FC of al users of Windows or not. If you install only for the current users no admin privileges are necessary. To be able to install for all users, you need admin privileges. So when doing this from a user's account the installer correctly asks your for the admin password.
After the installation, you can start FC immediately. If you do this while having installed for al users, FC is started as being executed from your admin account of course. This makes sense since also as admin you might want to check if everything works fine.
(Note also that the admin account is designed in Windows as the one to install and organize things for all users, not to be used as a normal user. A least for security reasons this is even a no-go.)
You can also install FC without a GUI, by using the command line, see section 3.2 here: https://nsis.sourceforge.io/Docs/Chapte ... allerusage
(replace "installer.exe" by the name of the FC installer .exe)
What is in your opinion a bug that should be fixed?
Re: Launch from Windows installer fails to drop privileges
That's correct. That is the same as if you e.g. start the cmd.exe with admin privileges and then execute from this e.g. Java. then Java has admin privileges too. (See also my previous post).