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!
Launch from Windows installer fails to drop privileges
Hi all. First post here. I may have found a bug immediately after doing an all-users install of FreeCAD 0.18 on a Windows 10 64-bit machine.
When FreeCAD came up after installation, none of my network drives were visible from the "Open..." or "Save As..." menus. There was nothing wrong with the network drives. They were available in other applications, e.g. Windows Explorer.
I'm assuming what happens is when FreeCAD is launched for the first time by the installer itself, the installer fails to drop Administrator privileges and runs FreeCAD as Administrator so the user's network drives are not visible. After closing FreeCAD and restarting it, the network drives function normally.
Besides being an annoyance to new users, this would also be a security bug of unknown consequences. If there is agreement, I can file a bug in mantis.
Thanks,
-Curt
When FreeCAD came up after installation, none of my network drives were visible from the "Open..." or "Save As..." menus. There was nothing wrong with the network drives. They were available in other applications, e.g. Windows Explorer.
I'm assuming what happens is when FreeCAD is launched for the first time by the installer itself, the installer fails to drop Administrator privileges and runs FreeCAD as Administrator so the user's network drives are not visible. After closing FreeCAD and restarting it, the network drives function normally.
Besides being an annoyance to new users, this would also be a security bug of unknown consequences. If there is agreement, I can file a bug in mantis.
Thanks,
-Curt
Re: Launch from Windows installer fails to drop privileges
Version 0.18 is outdated for new installs. Unlikely that a "bug" would be fixed even if verified.
Try with the current release version 0.19.
Gene
Try with the current release version 0.19.
Gene
Re: Launch from Windows installer fails to drop privileges
I'm curious why you put the word "bug" in quotes. Is this not of concern?
I can't. I had downloaded the installer today from the front page "DOWNLOAD NOW" button. The file name is:
FreeCAD-0.19.2.7b5e18a-WIN-x64-installer1.exe
However, after installing this latest version, "Help... About" reports:
OS: Windows 10
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.18.4 (GitTag)
Build type: Release
Branch: releases/FreeCAD-0-18
Hash: 980bf9060e28555fecd9e3462f68ca74007b70f8
Python version: 3.6.6
Qt version: 5.6.2
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/UnitedStates (en_US)
So, that is a second bug.
Re: Launch from Windows installer fails to drop privileges
Where did you get "DOWNLOAD NOW" ? This is a bug.
The version is correct.
Maybe you have 2 versions installed?
One at C:\Program Files\FreeCAD
The other at C:\Users\USERNAME\AppData\Local\FreeCAD 0.19
If so we can fix this.
"fight the good fight"
Re: Launch from Windows installer fails to drop privileges
Thank you sgrogan, you are correct. Both 0.18 and 0.19 showed up in Add/Remove Programs, both in C:\Program Files.
I was confused because the 0.19 installer launched 0.18, and I had forgotten I'd ever installed 0.18.
I uninstalled both versions from Add/Remove Programs and re-installed 0.19 to reproduce the first bug. it's also still there. I was able to save a file to C:\Program Files\foo.FCStd.
I was confused because the 0.19 installer launched 0.18, and I had forgotten I'd ever installed 0.18.
I uninstalled both versions from Add/Remove Programs and re-installed 0.19 to reproduce the first bug. it's also still there. I was able to save a file to C:\Program Files\foo.FCStd.
Re: Launch from Windows installer fails to drop privileges
To me it doesn't look like a bug but the known limitation of the Qt/native file dialog. I'll find a link about how to change.
Edit : here the link https://forum.freecadweb.org/viewtopic. ... 80#p273068
Edit : here the link https://forum.freecadweb.org/viewtopic. ... 80#p273068
Re: Launch from Windows installer fails to drop privileges
Bugs do not exist until they are verified. A strange occurrence is not necessarily a bug. It could even be intended behavior.
About half of the new forum members report "bugs" with their first post. In almost all cases the issue is not a bug at all.
I was not trying to say your concern is unimportant.
Gene
Re: Launch from Windows installer fails to drop privileges
In this case there are two real bugs in the installer. I'd understand arguing about how they should be prioritized. They did cause at least one user grief in the first half hour of their experience.
I can see where that could be annoying, at least in cases where reproduction would be difficult or time-consuming. Guidelines say that potential bugs should be discussed here before being filed. Anyway, enough with the meta-argument.About half of the new forum members report "bugs" with their first post. In almost all cases the issue is not a bug at all.
I see a comment in src/WindowsInstaller/include/gui.nsh
# The option to run FreeCAD from the finish page is currently disabled because
# it may run with Administrator priviledges, therefore causing a different
# user directory to be used. This could be fixed by creating a separate
# process without UAC elevation.
- Shalmeneser
- Veteran
- Posts: 9582
- Joined: Wed Dec 23, 2020 12:04 am
- Location: Fr
Re: Launch from Windows installer fails to drop privileges
No 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 !
Re: Launch from Windows installer fails to drop privileges
This 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?