2020-08-03

How to Reset Windows 10 Start Menu Layout to Default

Very simple, but very effective and useful method to restore default Start Menu layout in Windows 10.

  1. Open regedit.exe
  2. Navigate to:
    \HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\CloudStore\Store\Cache
  3. Delete (or rename) DefaultAccount key.

Source:
https://www.youtube.com/watch?v=XJFOXw75xtA

2018-09-21

Right click on Windows folder and open with Visual Studio Code

https://thisdavej.com/right-click-on-windows-folder-and-open-with-visual-studio-code/

Major Edit: It turns out that when you install VS Code for Windows, you have an opportunity to add an “Open with Code” action to the Windows Explorer file context menu—if you don’t hastily sprint through the installation and take the defaults like I did the first time around. 🙂 Take a deep breath and jog rather than scream through the installation. When you see the dialog box below, be sure to check the two checkboxes highlighted.

A. Manually add VSCode shortcuts to context menu when it is installed in C:\Program Files folder

vsCodeOpenFolder.reg
Windows Registry Editor Version 5.00
; Open files
[HKEY_CLASSES_ROOT\*\shell\Open with VS Code]
@="Edit with VS Code"
"Icon"="C:\\Program Files\\Microsoft VS Code\\Code.exe,0"
[HKEY_CLASSES_ROOT\*\shell\Open with VS Code\command]
@="\"C:\\Program Files\\Microsoft VS Code\\Code.exe\" \"%1\""
; This will make it appear when you right click ON a folder
; The "Icon" line can be removed if you don't want the icon to appear
[HKEY_CLASSES_ROOT\Directory\shell\VSCode]
@="Open Folder as VS Code Project"
"Icon"="\"C:\\Program Files\\Microsoft VS Code\\Code.exe\",0"
[HKEY_CLASSES_ROOT\Directory\shell\VSCode\command]
@="\"C:\\Program Files\\Microsoft VS Code\\Code.exe\" \"%1\""
; This will make it appear when you right click INSIDE a folder
; The "Icon" line can be removed if you don't want the icon to appear
[HKEY_CLASSES_ROOT\Directory\Background\shell\VSCode]
@="Open Folder as VS Code Project"
"Icon"="\"C:\\Program Files\\Microsoft VS Code\\Code.exe\",0"
[HKEY_CLASSES_ROOT\Directory\Background\shell\VSCode\command]
@="\"C:\\Program Files\\Microsoft VS Code\\Code.exe\" \"%V\""
removeVsCodeOpenFolder.reg
Windows Registry Editor Version 5.00

[-HKEY_CLASSES_ROOT\*\shell\Open with VS Code]
[-HKEY_CLASSES_ROOT\*\shell\Open with VS Code\command]
[-HKEY_CLASSES_ROOT\Directory\shell\VSCode]
[-HKEY_CLASSES_ROOT\Directory\shell\VSCode\command]
[-HKEY_CLASSES_ROOT\Directory\Background\shell\VSCode]
[-HKEY_CLASSES_ROOT\Directory\Background\shell\VSCode\command]

B. When Visual Studio Code is installed in C:\VSCode folder

vsCodeOpenFolder_C.reg
Windows Registry Editor Version 5.00
; Open files
[HKEY_CLASSES_ROOT\*\shell\Open with VS Code]
@="Edit with VS Code"
"Icon"="C:\\VSCode\\Code.exe,0"
[HKEY_CLASSES_ROOT\*\shell\Open with VS Code\command]
@="\"C:\\VSCode\\Code.exe\" \"%1\""
; This will make it appear when you right click ON a folder
; The "Icon" line can be removed if you don't want the icon to appear
[HKEY_CLASSES_ROOT\Directory\shell\VSCode]
@="Open Folder as VS Code Project"
"Icon"="\"C:\\VSCode\\Code.exe\",0"
[HKEY_CLASSES_ROOT\Directory\shell\VSCode\command]
@="\"C:\\VSCode\\Code.exe\" \"%1\""
; This will make it appear when you right click INSIDE a folder
; The "Icon" line can be removed if you don't want the icon to appear
[HKEY_CLASSES_ROOT\Directory\Background\shell\VSCode]
@="Open Folder as VS Code Project"
"Icon"="\"C:\\VSCode\\Code.exe\",0"
[HKEY_CLASSES_ROOT\Directory\Background\shell\VSCode\command]
@="\"C:\\VSCode\\Code.exe\" \"%V\""

2018-07-29

How to Rebuild BCD in Windows

A long day of searching (which is typical) for how to fix the non-booting Windows 10 installation.

Eventually I've found the following procedure, which simply just worked.
The best thing only the Option 1 (the simplest) was necessary in my case :)

  1. Start Advanced Startup Options if you're using Windows 10 or Windows 8.
    Start System Recovery Options if you're using Windows 7 or Windows Vista.
  2. Open Command Prompt from Advanced Startup Options or System Recovery Options menu.
  3. At the prompt, type the bootrec command as shown below and then press Enter:
    bootrec /rebuildbcd
    
    The bootrec command will search for Windows installations not included in the BCD and then ask you if you'd like to add one or more to it.
  4. You should see one of the following messages at the command line.

    1. Option 1
      Scanning all disks for Windows installations.
      Please wait, since this may take a while...
      Successfully scanned Windows installations.
      Total identified Windows installations: 0
      The operation completed successfully.
      
      Option 2
      Scanning all disks for Windows installations.
      Please wait, since this may take a while...
      Successfully scanned Windows installations.
      Total identified Windows installations: 1
      [1] C:\Windows
      Add installation to boot list? Yes/No/All:
      
    2. If you see Option 1: Move on to Step 5. This result most likely means that Windows installation data in the BCD store exists but bootrec couldn't find any additional installations of Windows on your computer to add to the BCD. That's fine; you'll just need to take a few extra steps to rebuild the BCD.
    3. If you see option 2: Enter Y or Yes to the Add installation to boot list? question, after which you should see The operation completed successfully, followed by a blinking cursor at the prompt. Finish up with Step 10 toward the bottom of the page.

Read the whole post:
https://www.lifewire.com/how-to-rebuild-the-bcd-in-windows-2624508

2018-06-11

Safely Remove Unused Kernels In RHEL/CentOS/Fedora

There are three main ways to do it:

  1. Use package-cleanup command from yum-utils
  2. Use Fedora's dnf remove combined with dnf repoquery
  3. Set maximum number of installed kernels in /etc/yum.conf file
First:
# yum install yum-utils
# package-cleanup --oldkernels --count=2
Second:
# dnf remove $(dnf repoquery --installonly --latest-limit 2 -q)
Third:
# vim /etc/yum.conf
installonly_limit=3  #set kernel count

See also: