{ claus.conrad }

Microsoft Windows

FAQ

Get a List of all Installed Programs (and Updates)

  1. On the machine in question launch a command window.
  2. To display all the installed programs execute the following two commands:
WMIC
product get name,version
  1. To export all the installed programs to a text file (c:ProgramList.txt) execute the following two commands:
WMIC
/output:c:ProgramList.txt product get name,version
  1. To export all the installed updates to a text file (c:UpdateList.txt) execute the following two commands:
WMIC
/output:C:UpdatelList.txt QFE get

Source: https://www.petenetlive.com/KB/Article/0000619

Using the Windows OpenSSH Agent from WSL

  1. Install socat in the WSL distro:
sudo apt install socat
  1. Install npiperelay in Windows:
choco install npiperelay
  1. Insert into ~/.bashrc in the WSL distro:
# Configure ssh forwarding
export SSH_AUTH_SOCK=$HOME/.ssh/agent.sock
# need `ps -ww` to get non-truncated command for matching
# use square brackets to generate a regex match for the process we want but that doesn't match the grep command running it!
ALREADY_RUNNING=$(ps -auxww | grep -q "[n]piperelay.exe -ei -s //./pipe/openssh-ssh-agent"; echo $?)
if [[ $ALREADY_RUNNING != "0" ]]; then
    if [[ -S $SSH_AUTH_SOCK ]]; then
        # not expecting the socket to exist as the forwarding command isn't running (http://www.tldp.org/LDP/abs/html/fto.html)
        echo "removing previous socket..."
        rm $SSH_AUTH_SOCK
    fi
    echo "Starting SSH-Agent relay..."
    # setsid to force new session to keep running
    # set socat to listen on $SSH_AUTH_SOCK and forward to npiperelay which then forwards to openssh-ssh-agent on windows
    (setsid socat UNIX-LISTEN:$SSH_AUTH_SOCK,fork EXEC:"npiperelay.exe -ei -s //./pipe/openssh-ssh-agent",nofork &) >/dev/null 2>&1
fi

Source: https://stuartleeks.com/posts/wsl-ssh-key-forward-to-windows/

WSL (Windows Subsystem for Linux) documentation

https://learn.microsoft.com/en-us/windows/wsl/

Switch easily between VirtualBox and Hyper-V with a BCDEdit boot Entry

Some sites say to use Add/Remove Features to turn the Hyper-V support off, but that seems like a big deal to do what should be a small thing.

Instead, from an administrative command prompt I made a copy of my boot menu with a “No Hyper-V” entry:

Note the first command gives you a GUID and you then copy it and use it with the second command.

C:>bcdedit /copy {current} /d “No Hyper-V”

The entry was successfully copied to {ff-23-113-824e-5c5144ea}.

C:>bcdedit /set {ff-23-113-824e-5c5144ea} hypervisorlaunchtype off

The operation completed successfully.

Now, this is important. In Windows 8.x, Windows is optimized to startup FAST. And it does. On my Lenovo it starts in about 3 seconds, faster than I can press any buttons to interrupt it. But when I want to dual boot, I need it to really shut down and give me an option to chose this new boot menu.

In order to access the new boot menu, I select Settings (Windows Key + C) then Power, and Restart but hold down shift on the keyboard while clicking Restart with the mouse.

HOLD SHIFT while pressing Restart

You will get this scary looking Blue Screen. Select “Other Operating Systems” and your “No Hyper-V” option is in there.

Now, you can run Virtual Box nicely but still choose Hyper-V when you want. You can confirm VirtualBox works by noting that the Acceleration tab will not be grayed out under System Settings for your VMs. Reboot normally and Hyper-V will be back and ready to go.

Source: http://www.hanselman.com/blog/switch-easily-between-virtualbox-and-hyperv-with-a-bcdedit-boot-entry-in-windows-81

Shortcuts

ShortcutFunction
Ctrl+Win+LeftSwitch to previous desktop
Ctrl+Win+RightSwitch to next desktop