Trouble running on Windows

Some of my beta users are running my desktop app on Windows and when they try to run the EXE file, it fails to run and instead windows gives them an error:

The code execution cannot proceed because ucrtbased.dll was not found

I have run a google search and my best guess is that these people do not have Visual C++ libraries installed. Is there a way around this? It doesn’t seem practical for my users (and future customers) to have to install programming libraries :sweat:

The Projucer these days by default sets the VS projects to use the dynamically linked runtime library. If you don’t want to deal with the headache of the users having to install the runtime separately, you should set the Projucer to set the exported project to use the static runtime.

1 Like

Test your binary with the dependencywalker: https://docs.microsoft.com/en-us/previous-versions/ms235265(v=vs.140)
http://www.dependencywalker.com/

It will tell you, which dlls will be needed. As @Xenakios pointed out, probably one from the redistributables you need to bundle in the installer or link statically.
Most times they are already available from any other installer, but not always.

1 Like

Thanks guys, I think that the problem was that I forgot to build a release version before sharing with non-developers.

The release versions also use the dynamic runtime by default.

1 Like

Oh ok. Thanks!

Yes, ideally the developer would create an installer that also installs all the needed dependencies, but how to create installers is not widely spread knowledge. Some end users also tend to complain when they are given an installer instead of a directly usable .exe or .dll…

The main issue for me is that annoying screen from Windows that says that the app is coming from an untrusted source and has a big “Don’t Run” button. On Mac, I can just sign my apps via XCode, but I do not know the equivalent process for PC.

CMD Line:

"C:\Program Files (x86)\Windows Kits\8.1\bin\x64\signtool.exe" sign /f "C:\PathToYourCertificate\yourcertificatefile.p12” /p YourPassWordGoesHere /t http://timestamp.verisign.com/scripts/timstamp.dll YourSetupFile.exe

Rail

1 Like

Thanks. Do you have any advice regarding the digitally signing process? For example, on Mac I actually registered my certificate with the Apple Developer platform online, so that it is trusted by Apple. Is there any such process with Microsoft, or is it completely DIY?

We use a Comodo signing certificate… there are previous threads on this forum with a list of your options.

You need to have a physical address, etc which Comodo can verify… their site should have all the details… the requirements have changed in the last year or so

Rail

2 Likes

Awesome! Thanks