-
Notifications
You must be signed in to change notification settings - Fork 292
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Windows] Visual C++ Redistributable is required at runtime #167
Labels
documentation
Documentation updates, including examples code
Comments
Djiit
added
electron
Electron-related issues, bugs or questions
windows
Windows related issues, includes WSL and MSYS
labels
Jun 11, 2019
2 tasks
Thank you so much. I spend the last 3 hours looking for a solution and installing VC_redist.x64.exe totally worked for me. Honestly it SHOULD be mentioned in the readme... |
@thomvaill Thanks for the this solution. It's working fine on win 10 but makes error on win 7. Can u provide me a solution for win 7 ? |
This was referenced Jul 25, 2020
Will add to docs. Thanks for the solution. |
ash0x0
added
documentation
Documentation updates, including examples code
and removed
electron
Electron-related issues, bugs or questions
windows
Windows related issues, includes WSL and MSYS
labels
Jun 11, 2021
Added to doc. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
IoHook cannot run on a Windows platform that does not have Visual C++ Redistributable installed (which is the case of a lot of people. Example: it is not installed on a fresh Windows 10 install).
I don't know if it has always been the case or if it's a new compilation bug.
After some search, those issues may be related:
Expected Behavior
I am not a Windows developer, but I think
uiohook.dll
should be linked with static runtime libs, so the end user does not have to install Visual C++ RedistributableCurrent Behavior
It looks like
uiohook.dll
is linked with the dynamic C Runtime library.Dependency Walker output of
uiohook.dll
:Possible Solution
Here again, I am not a Windows developer, but this may be a hint: https://stackoverflow.com/questions/1073509/should-i-redistribute-msvcrt-dll-with-my-application
https://braintrekking.wordpress.com/2013/04/27/dll-hell-how-to-include-microsoft-redistributable-runtime-libraries-in-your-cmakecpack-project/
I wish I could fix it, but I don't know where this
/MT
option should be set.Steps to Reproduce
On a fresh Windows 10 install:
git clone https://github.com/wilix-team/iohook.git && cd iohook/
npm install
node examples/example.js
Then, go to https://support.microsoft.com/en-us/help/2977003/the-latest-supported-visual-c-downloads and install vc_redist.x64.exe.
Now it works!
NB1: if Visual C++ Redistributable is already installed on your Windows instance, you can reproduce the bug by uninstalling it:
NB2: I showed you how to reproduce the bug with a pre-built version of iohook. I tested to build it myself --> the bug is still there!
Context
I am developing a "click to screenshot" app with Electron. I want to distribute it on Linux, MacOS and Windows.
Possible workaround 1:
I ask my users to go to https://support.microsoft.com/en-us/help/2977003/the-latest-supported-visual-c-downloads and install vc_redist.x64.exe before installing my app.
--> I can't ask this to my users!
Possible workaround 2:
I achieve to distribute the missing DLLs into my Electron bundle.
I wish I could do that but I did not find a way to do it :(
Possible workaround 3:
I find a Windows installer that is able to install my app and install Visual C++ Redistributable in the background.
--> I have find one compatible with Electron :(
Your Environment
The text was updated successfully, but these errors were encountered: