Nushell will fail to install on a clean Windows 11 installation
Describe the bug
I wanted to try out nushell on my Win11 laptop (Lenovo Thinkpad P52), but the installation failed every time I tried to install it. I tried the winget command and I also tried to install the MSI package.
Microsoft Terminal responded with an "error 1603" in the end.
The logfile says:
"....
Action start 19:41:55: ReplacePathsInWindowsTerminalProfile.
Action ended 19:41:55: ReplacePathsInWindowsTerminalProfile. Return value 1.
Action start 19:41:55: InstallFinalize.
CAQuietExec: Error 0xc0000135: Command line returned an error.
CAQuietExec: Error 0xc0000135: QuietExec Failed
CAQuietExec: Error 0xc0000135: Failed in ExecCommon method
CustomAction ReplacePathsInWindowsTerminalProfile returned actual error code 1603 (note this may not be 100% accurate if translation happened inside sandbox)
Action ended 19:41:56: InstallFinalize. Return value 3.
Action ended 19:41:56: INSTALL. Return value 3.
Property(S): DiskPrompt = nu Installation
Property(S): UpgradeCode = {82D756D2-19FA-4F09-B10F-64942E89F364}
Property(S): APPLICATIONFOLDER = C:\Program Files\nu
Property(S): Bin = C:\Program Files\nu\bin
....
"
FIX: I found the fix from the error 0xc000135 above in this article.
The article says to install .NET Framework 3.5. Which I did. (Run:optionalfeatures). No need to install the Non-HTTP/HTTP Activation Features I could the afterwards have nushell installed successfully with the winget command :)
How to reproduce
- A clean installation of Windows 11. I have only tried version 22H2
- From Microsoft Terminal: winget install nushell
- Nushell will then fail to install with an error 1603
Expected behavior
I expected the winget command to install the nushell successfully
Screenshots
Configuration
~> version | transpose key value | to md --pretty 06/26/2023 08:26:46 PM| key | value | | ------------------ | ---------------------------------------- | | version | 0.81.0 | | branch | | | commit_hash | 5c81bcef1a3c1667468c81ef8c06cf56a0962133 | | build_os | windows-x86_64 | | build_target | x86_64-pc-windows-msvc | | rust_version | rustc 1.68.2 (9eb3afe9e 2023-03-27) | | rust_channel | 1.68.2-x86_64-pc-windows-msvc | | cargo_version | cargo 1.68.2 (6feb7c9cf 2023-03-26) | | build_time | 2023-06-06 22:57:54 +00:00 | | build_rust_channel | release | | features | default, sqlite, trash, which, zip | | installed_plugins | | ~> 06/26/2023 08:26:50 PM
Additional context
No response
We think we've fixed that with this PR https://github.com/nushell/nushell/pull/9513. We'll have to wait and see.
Yes, I think this is fixed by #9513, which will be included in the next release.
Let me briefly explain why this was happened:
Installer generated automatically by release ci workflow did not contain MSVC runtime as described in #9513, therefore, MSVC runtime (.net framework redistributable) is required to be pre-installed in the system to execute nushell.
When installing windows terminal profile feature, following nushell command is executed to update the windows terminal profile configuration, ([#exe0] refers nu.exe in the installation script)
https://github.com/nushell/nushell/blob/63aba5feb73aeb0adf8e94068e68ef35cabce8f0/wix/main.wxs#L378
which fails since nushell cannot be executed when there is no pre-installed MSVC runtime in the system.
Ran into this issue, on the current latest on winget - was able to install an older version.
For anyone else you can use:
winget install -e --id Nushell.Nushell -v 0.94.0
Unable to update however as i get the error code: 1603 The logs indicate a problem with user privileges.
Yes, my understanding was that in some circumstances you have to use an elevated prompt with winget to install nushell.
Yes, my understanding was that in some circumstances you have to use an elevated prompt with winget to install nushell.
I was trying to install version 0.97.1 and got this error this comment from @fdncred fixed the issue for me
Winget creates a directory, Winget, in the user's temp folder (%TEMP% in cmd.exe) but for some reason changes the permissions so that administrators have access but the user does not. The fix is to change the permissions on the Winget directory to grant yourself access.