cryptomator / cryptomator-win

Cryptomator .exe installer for Windows
GNU General Public License v3.0
21 stars 12 forks source link

Dokany refuses to install but Visual C++ Runtime is present #15

Closed edgarrc closed 4 years ago

edgarrc commented 5 years ago

Basic info

image

Issue

The installer shows a warning saying that Dokany will not be installed because Visual C++ Runtime is not present, but it is present. Looks like the dependency version is just referencing a specific and old one.

The old version of Visual C++ Runtime. linked on Crytomato's download url, can't be insalled if you already have a most recent version installed.

Related

overheadhunter commented 5 years ago

I assume you get this warning from the Dokany installer, not from the Cryptomator installer. I.e. after Cryptomator launches the "subinstaller"? In this case it might be worth reporting this issue to dokan-dev/dokany.

edgarrc commented 5 years ago

@overheadhunter I was not sure about this because of this commit:

https://github.com/cryptomator/cryptomator-win/commit/24d336b7ecfa9b521341c6b0c4fe6ac42dd7af68

Looks like this verification step is done on Cryptomator setup process, calling this function DokanDependencyCheck

This function uses the registry path:

RegVcRedistKey = 'SOFTWARE\Wow6432Node\Microsoft\VisualStudio\14.0\VC\Runtimes\x64';

Which I have on registry. But requires:

Result := (major >= 14) and (minor >= 11) and (build >= 25325)

Which I don't have installed exactly like is required, despite of having a most recent version installed:

image

While searching about this, I found a bug on VC++ runtime installer:

https://developercommunity.visualstudio.com/content/problem/332815/visual-c-redistributable-2017-install-removes-visu.html

After Joseph Scarpato, answer, I don't think Microsoft will fix this. But he is suggesting as a workaround calling an repair on VC++ setup. According to this post, the repair procedure will fix this registry setting correctly.

I will try to manually repair this VC++ setup and try again.

overheadhunter commented 5 years ago

Interesting... there might be others having the same problem, so we should consider any other way of checking the VC++ version, as we can not ask everyone to manually fix their registry...

edgarrc commented 5 years ago

After repair, this is what my registry looks like:

image

So this function will not fail anymore.

Maybe the wmic command can be used (it requires elevated privileges to be run), this command will list all programs installed.

C:\WINDOWS\system32>wmic
wmic:root\cli>/output:C:\Temp\InstalledPrograms.txt product get name,version
wmic:root\cli>
ifrh commented 5 years ago

Well, On Windows 8.1 (64bit) I have installed multiple MSVC redist (and multiple Java versions) and in Cryptomator 1.4.10 I can choose Dokany. But updating Cryptomator from 1.4.2-x64 to 1.4.10-x64 an Windows 10 (64bit) with also having multiple MSVC-redist grafik I cannot choose Docany inside Cryptomator - well there is a Java 8 in my PATH-variable.

ifrh commented 5 years ago

https://support.microsoft.com/en-us/help/2977003/the-latest-supported-visual-c-downloads

Download the Microsoft Visual C++ Redistributable for Visual Studio 2015, 2017 and 2019. The following updates are the latest supported Visual C++ redistributable packages for Visual Studio 2015, 2017 and 2019. Included is a baseline version of the Universal C Runtime see MSDN for details.

x86: [vc_redist.x86.exe](https://aka.ms/vs/16/release/vc_redist.x86.exe)

x64: [vc_redist.x64.exe](https://aka.ms/vs/16/release/vc_redist.x64.exe)

ARM64: [vc_redist.arm64.exe](https://aka.ms/vs/16/release/VC_redist.arm64.exe)

Note Visual C++ 2015, 2017 and 2019 all share the same redistributable files.

For example, installing the Visual C++ 2019 redistributable will affect programs built with Visual C++ 2015 and 2017 also. However, installing the Visual C++ 2015 redistributable will not replace the newer versions of the files installed by the Visual C++ 2017 and 2019 redistributables.

This is different from all previous Visual C++ versions, as they each had their own distinct runtime files, not shared with other versions.

After installing "Visual C++ 2015, 2017 ,2019" redist from above, I could reinstall Cryptomator with enabled Dokany. grafik

grafik

The solution, in my opinion, is to update your the URL for current MSVC-redist on your webpage: grafik