Unknown problem with root_v6.30.02.win64.vc17.exe on win10

After download .zip of root_v6.30.02.win64.vc17 and faild to set up required environment variables(thisroot.ps1 &thisroot.bat can’t execute even “refreshenv”). I try .exe of root_v6.30.02.win64.vc17. It says "a regular Windows installer package also setting up the required environment variables.“and"You can double-click ROOT to run it”. But when I click ROOT, it showed a cmd and closed rapidly with some words like these:

RegOpenKeyEx(HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SDKs\Windows\$VERSION\InstallationFolder): returned 2: ?暏3蟺谂=?3)
RegOpenKeyEx(HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows Kits\Installed Roots\KitsRoot10): returned 2: ?暏3

Assertion failed: OldBuilder->DeferredDeclsToEmit.empty() && "Should have emitted all decls deferred to emit.", file C:\build\ws\BUILDTYPE\Release\LABEL\windows64\V\6-30\root\interpreter\llvm-project\clang\lib\CodeGen\ModuleBuilder.cpp, line 155

_ROOT Version:6.30.02.win64.vc17

What do you mean? How and where did you install ROOT? How did you try to run thisroot.[bat|ps1]?

I download root in here: https://root.cern/download/root_v6.30.02.win64.vc17.exe
I run thisroot.ps1 by powershell, use “notepad $PROFILE” and type ". “path\to\thisroot.ps1” ". But it showed “The specified path could not be found”

Sorry, but it’s still not clear to me. Can you copy and paste the commands you type? For example:

** Visual Studio 2022 Developer PowerShell v17.10.0
** Copyright (c) 2022 Microsoft Corporation
PS C:\Program Files\Microsoft Visual Studio\2022\Community> cd C:\root-dev\
PS C:\root-dev> .\build\x64\release\bin\thisroot.ps1
PS C:\root-dev> root
  | Welcome to ROOT 6.33.01                        https://root.cern |
  | (c) 1995-2024, The ROOT Team; conception: R. Brun, F. Rademakers |
  | Built for win64 on Jun 05 2024, 07:37:25                         |
  | From heads/master@v6-31-01-2250-gc767271b30                      |
  | With MSVC 19.40.33808.0                                          |
  | Try '.help'/'.?', '.demo', '.license', '.credits', '.quit'/'.q'  |

root [0]

You are trying to add the call to thisroot to your profile, so that it is called automatically whenever you start a terminal, right?

Try first by hand in one terminal, being sure that you replace path with the name of the folder where the .ps1 file is located. It seems that you are point to a non-existing folder. Also, you do not need to use the ‘dot’ when calling the script in Windows. This is maybe a bug in the documentation?

Once that works, you can try to automatize the process by putting these instructions into your profile.

1 Like

sorry for reply so long, I had used root for linux, so win10 is not necessary.Thanks for your help.