ROOT C++ in Windows

I want to run cern root in windows without using wsl or virtual box, I want to use it using visual studio code.

Then you can download a pre-built release from the ROOT web page, e.g. Release 63006 - ROOT
And you also have to install Visual Studio 2022 (Community is free), with the Desktop development with C++

Ok, I tried once as stated by the cern root website but there are some errors I am getting like unable to find the visual studio code.

I am a complete newbie in this windows environment, Could you please help, me?

Visual Studio Code is not part of ROOT. You have to install it from

Ok, I have downloaded it, and currently installing it.

What should I do next?

Well, I don’t know, what do you want to achieve? Did you try Get Started - ROOT and ROOT Primer - ROOT ? I would suggest to start from there

well, I want to install root in windows and work in it, as people install it in different os like linux and all
and use it.

Then as I said, just follow Get Started - ROOT and in particular ROOT Primer - ROOT
To start ROOT, once you installed it, open a Developer Command Prompt for VS 2022, then assuming you installed ROOT in C:\root, call (type) C:\root\bin\thisroot.bat and then you can start ROOT. For example:

** Visual Studio 2022 Developer Command Prompt v17.9.6
** Copyright (c) 2022 Microsoft Corporation


  | Welcome to ROOT 6.30/06               |
  | (c) 1995-2024, The ROOT Team; conception: R. Brun, F. Rademakers |
  | Built for win64 on Apr 03 2024, 06:35:12                         |
  | From tags/v6.30.06-0-g4f4e716372@v6.30.06-0-g4f4e716372          |
  | With MSVC 19.39.33521.0                                          |
  | Try '.help'/'.?', '.demo', '.license', '.credits', '.quit'/'.q'  |

root [0]

I tried this at the end it says “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.
input_line_1:1:10: fatal error: ‘new’ file not found
Assertion failed: OldBuilder->DeferredDeclsToEmit.empty() && “Should have emitted all decls deferred to emit.”, file C:\ROOT-CI\src\interpreter\llvm-project\clang\lib\CodeGen\ModuleBuilder.cpp, line 155”

Did you install Visual Studio (2022)? (NOT the Visual Studio Code editor)

yes tried with that the community version

And you started from a Developer Command Prompt for VS 2022? Can you copy and paste the whole session, as I did in the example?

OK checking it!

Following Steps I have done now:

  1. Downloaded root( 172M) from here: Release 53436 - ROOT

  2. Installed VIsual Studio Code community

  3. Opened the Developer command prompt for vs 2022

4 run this line to get to username directory:


5 run this line for final installation:c:\root\bin\thisroot.bat

I am getting this:The system cannot find the path specified.

Where did you install (unzipped) ROOT?

under the username directory, “abhis”

Then from your abhis user directory, call root\bin\thisroot.bat

so this batch file is under bin directory, under root directory, under abhis directory.

so my code"“c:\root\bin\thisroot.bat” was correct right?


No, as I said, it should be: C:\Users\abhis>root\bin\thisroot.bat