[SOLVED] Silent windows (de)installation

Having trouble installing or compiling FreeCAD? Get help here.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
thomas.besser
Posts: 14
Joined: Tue Apr 14, 2015 8:05 am

[SOLVED] Silent windows (de)installation

Post by thomas.besser »

Hi,

for automatic deployment (e.g. OPSI) of freecad silent install and uninstall options are needed.

Silent installation with "FreeCAD-0.15.4671_x64_setup.exe /S" (NSIS Installer) does work as expected, but not uninstallation.

Execution of ""C:\Program Files\FreeCAD 0.15\uninstall.exe" /S" (according to 'QuietUninstallString' from registry HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\FreeCAD 0.15) leads to a popup 'FreeCAD 0.15 Uninstall. Permanently remove FreeCAD' and waits for approval.

According to this hint the NSIS Installer lacks the possibility to uninstall silently by default.

Would it be possible to add this feature to the NSIS installer for FreeCAD?

For me it would be sufficient to have a portable stable version of FreeCAD too. But if I understand this right these 7-zip archives are only available for development versions.

Documentation regarding install on windows is outdated, because there is written about MSI packages. BTW these would be silently (un)installable by default ;-)

Regards
Thomas
Last edited by thomas.besser on Thu Apr 16, 2015 7:30 am, edited 1 time in total.
wmayer
Founder
Posts: 20324
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: Silent windows (de)installation

Post by wmayer »

Would it be possible to add this feature to the NSIS installer for FreeCAD?
issue #2056
For me it would be sufficient to have a portable stable version of FreeCAD too. But if I understand this right these 7-zip archives are only available for development versions.
You can easily create your own 7-zip archive from an NSIS installer. First run a normal installation, then make a 7-zip archive from the directory where you have installed it and afterwards uninstall it.
thomas.besser
Posts: 14
Joined: Tue Apr 14, 2015 8:05 am

Re: Silent windows (de)installation

Post by thomas.besser »

wmayer wrote:
Would it be possible to add this feature to the NSIS installer for FreeCAD?
issue #2056
Ok.
For me it would be sufficient to have a portable stable version of FreeCAD too. But if I understand this right these 7-zip archives are only available for development versions.
You can easily create your own 7-zip archive from an NSIS installer. First run a normal installation, then make a 7-zip archive from the directory where you have installed it and afterwards uninstall it.
Great, thanks.
thomas.besser
Posts: 14
Joined: Tue Apr 14, 2015 8:05 am

Re: Silent windows (de)installation

Post by thomas.besser »

wmayer wrote:
For me it would be sufficient to have a portable stable version of FreeCAD too. But if I understand this right these 7-zip archives are only available for development versions.
You can easily create your own 7-zip archive from an NSIS installer. First run a normal installation, then make a 7-zip archive from the directory where you have installed it and afterwards uninstall it.
Backuped the installed directory, resetted the virtual machine, copied back and installed 'vcredist_x64.exe' which was also in the installation directory, but executing 'freecad.exe' does make nothing. No process getting started, no error message on cmd.

Am I missing something else?
wmayer
Founder
Posts: 20324
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: Silent windows (de)installation

Post by wmayer »

freecad.exe doesn't write anything on cmd. Try freecadcmd.exe instead. You can also try freecad.exe --write-log which creates the file FreeCAD.log under %APPDATA%/FreeCAD. This might give you an idea.
thomas.besser
Posts: 14
Joined: Tue Apr 14, 2015 8:05 am

Re: Silent windows (de)installation

Post by thomas.besser »

freecadcmd.exe reports a python error, line 400 in 'bin\lib\os.py' on 'import UserDict':
"ImportError: No module named Userdict"

Found file 'userdict.py' in 'bin\lib' directory. So probably it could not be found!?

freecad.exe --write-log creates no output or file in %appdata%\freecad\freecad.log
Perhaps the error comes before it could be started...
wmayer
Founder
Posts: 20324
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: Silent windows (de)installation

Post by wmayer »

'bin\lib\os.py'
Is this the directory structure of an *installed* FreeCAD? I ask this because you can open the NSIS installer with 7-zip and extract all files but AFAIK this won't be the correct directory structure.
I would have expected that lib is not a sub-directory of bin but a sibling directory, i.e. they have the same parent directory.
wmayer
Founder
Posts: 20324
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: Silent windows (de)installation

Post by wmayer »

OK, I just looked at an installed FreeCAD and the directory structure is correct but the directory must be "Lib" and not "lib".
thomas.besser
Posts: 14
Joined: Tue Apr 14, 2015 8:05 am

Re: Silent windows (de)installation

Post by thomas.besser »

Yes, was copied from an installation directory.

But IMO is windows case-insensitive?! So 'Lib' should be the same as 'lib'?

Perhaps something went wrong on copying, so I will retry the procedure...
wmayer
Founder
Posts: 20324
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: Silent windows (de)installation

Post by wmayer »

Sure, Windows or better NTFS is case-insensitive but Python is not. So, you should try if renaming it to "Lib" fixes the problem.
Post Reply