Logbook + Scratchpad

windows

I am a long-time Linux user because I value not only the developer-friendliness, but the freedom of choice and customization as well. I have the impression that Microsoft is making Windows more and more annoying to users by removing this freedom. I have at least two examples for Windows 11.

Searching files on the whole Internet

Someone at Microsoft thought that expanding the file search to the whole Internet was a good idea, and there is no clear option to disable this stupid behavior. The only choice is to manually edit the registry like so:

  1. Open HKEY_CURRENT_USER\Software\Policies\Microsoft\Windows.
  2. If it doesn't exist, create an Explorer key.
  3. Create a new DWORD under Explorer, name it DisableSearchBoxSuggestions, and give it a value of 1.
  4. Reboot.

One of the sources: https://www.tomshardware.com/how-to/disable-windows-web-search

Copilot active by default

I don't want Copilot. There are many reasons, but I don't like it being imposed on me. Again, the only choice (at least for the Home edition) is to do it manually with regedit.

  1. Open HKEY_CURRENT_USER\Software\Policies\Microsoft\Windows.
  2. If it doesn't exist, create a WindowsCopilot key.
  3. Create a new DWORD under WindowsCopilot, name it TurnOffWindowsCopilot, and give it a value of 1.
  4. Reboot.

One of the sources: https://allthings.how/how-to-disable-copilot-on-windows-11/

#windows #rant

Today I struggled quite a bit to successfully run scp on Windows 11 and copy files to a remote SFTP server. It took quite some research to try and find out (without results) why the scp command was hanging up on a line like the following (with -v enabled):

[...]
debug1: Sending command: scp -v -t path/

The weird thing is that the same command would work perfectly on Linux, so it was definitely a Windows issue. My gut feeling was that scp was not using the SFTP subsystem, but there was no -s option (like in its Linux counterpart) to force its usage.

Running ssh -V returned version 8.6. Knowing that SFTP is the default protocol starting from OpenSSH 9.0, I decided to upgrade OpenSSH. Luckily, the latest versions of OpenSSH include an MSI installer to make installation easier.

In a nutshell, this is what I had to do:

  • Get the Win64 MSI installer from the latest release of OpenSSH (v9.5.0.0p1-Beta when I did this).
  • Run the installer, which does not have a UI so it seems to exit abruptly, but it installs everything correctly.
  • Follow the instructions on the GitHub wiki, which basically involve updating the path with the following command in a PowerShell with admin rights:

    [Environment]::SetEnvironmentVariable("Path", [Environment]::GetEnvironmentVariable("Path",[System.EnvironmentVariableTarget]::Machine) + ';' + ${Env:ProgramFiles} + '\OpenSSH', [System.EnvironmentVariableTarget]::Machine)
    
  • Close and reopen the terminal where I was using scp.

  • Run ssh -V to confirm the update.

After the update, scp ran without issues.

#tech #windows