# Looks like I have to abandon Root on Windows

**URL:** <https://root-forum.cern.ch/t/looks-like-i-have-to-abandon-root-on-windows/32339>\
**Category:** ROOT\
**Created:** [January 17, 2019, 9:15pm UTC](https://root-forum.cern.ch/t/looks-like-i-have-to-abandon-root-on-windows/32339 "2019-01-17T21:15:43Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![tjrob](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/tjrob/32/17767_2.png) [@tjrob](https://root-forum.cern.ch/u/tjrob)\
**Post date:** [January 17, 2019, 9:15pm UTC](https://root-forum.cern.ch/t/looks-like-i-have-to-abandon-root-on-windows/32339/1 "2019-01-17T21:15:43Z")

</div>

* * *

_ROOT Version:_ root\_v6.14.06  
_Platform:_ Windows 10  
_Compiler:_ VS 2017

* * *

I (finally!) got my program to build on Mac, Linux, and Windows. It runs on Mac and Linux, where I have filtered out the “Strange error messages” (different forum thread) from the user. I have to include the entire root directory structure inside my distribution.

The problem is Windows. I have put $APPDIR/root/bin into PATH so the Root DLLs are found in the correct relationship to the rest of the Root installation. The program passes all 113 regression tests on my build machine, which of course has the Windows SDK installed.

When I install it on a bare Windows 10 install, loading the Root DLLs **hangs forever** with these error messages (minus the ones already filtered out):

> RegOpenKeyEx(HKEY\_LOCAL\_MACHINE\SOFTWARE\Microsoft\Microsoft SDKs\Windows$VERSION\InstallationFolder): returned 2: The system cannot find the file specified.  
> RegOpenKeyEx(HKEY\_LOCAL\_MACHINE\SOFTWARE\Microsoft\Windows Kits\Installed Roots\KitsRoot10): returned 2: The system cannot find the file specified.

This is clearly Root looking for the SDK. Note I **cannot** expect my users to install the SDK. On Mac and Linux, Root looks for the SDK, fails to find it, emits a bunch of error messages, and then correctly reads and writes what I need (TFile, TDirectory, and TNtuple). On Windows, Root **hangs forever during DLL loading**.

Is there any way to fix this?

While I could put stuff into the distribution to fake something out, I cannot put fake values into global registry entries – that would compromise the integrity of the system.

---

<div class="post-metadata">

**Author:** ![bellenot](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/bellenot/32/29217_2.png) [@bellenot](https://root-forum.cern.ch/u/bellenot)\
**Post date:** [January 18, 2019, 7:55am UTC](https://root-forum.cern.ch/t/looks-like-i-have-to-abandon-root-on-windows/32339/2 "2019-01-18T07:55:38Z")

</div>

> [@tjrob](#):
>
> This is clearly Root looking for the SDK. Note I **cannot** expect my users to install the SDK

Those are only warnings, and should not prevent ROOT from running… And they should be fixed in the next versions of ROOT. Does that mean that you cannot start ROOT from the command prompt at all? Here, I mean install ROOT, call `root/bin/thisroot.bat`, and then `root.exe`.  
Note also that ROOT 6 on Windows is in a **preview** state and is not yet fully working

---

<div class="post-metadata">

**Author:** ![bellenot](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/bellenot/32/29217_2.png) [@bellenot](https://root-forum.cern.ch/u/bellenot)\
**Post date:** [January 18, 2019, 10:46am UTC](https://root-forum.cern.ch/t/looks-like-i-have-to-abandon-root-on-windows/32339/3 "2019-01-18T10:46:45Z")

</div>

OK, I just tried, and you’re right, it doesn’t work…

---

<div class="post-metadata">

**Author:** ![system](https://root-forum.cern.ch/uploads/default/original/3X/e/f/efe4f24398fd8ffeb76bccb6ecc46d9d9c003376.png) [@system](https://root-forum.cern.ch/u/system)\
**Post date:** [February 1, 2019, 10:47am UTC](https://root-forum.cern.ch/t/looks-like-i-have-to-abandon-root-on-windows/32339/4 "2019-02-01T10:47:55Z")

</div>

Closed on February 1, 2019, 10:47am UTC

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
