Windows 10 Tweaks & Fixes

Discussion in 'Windows 10' started by Zardoc, Jul 17, 2015.

  1. hb860

    hb860 MDL Expert

    May 7, 2010
    1,012
    1,858
    60
    The search from start won't work. You have been warned.
    You can use the Classic Shell and its search. The search engine in Windows 10 is not affected, but the default start menu has Cortana *hardcoded* to. That's a shame.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  2. tistou77

    tistou77 MDL Expert

    Mar 22, 2008
    1,827
    573
    60
    #1104 tistou77, May 19, 2017
    Last edited: May 19, 2017
    To delete
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. bobkush

    bobkush MDL Novice

    May 22, 2017
    21
    44
    0
    #1105 bobkush, May 22, 2017
    Last edited: May 23, 2017
    Reg file to add BOTH Command Prompt and Powershell to Context Menu

    NOTE: Although Windows 10 allows you to add the Command Prompt OR Powershell
    to the Win-X menu - it does not allow you to add BOTH. This reg file will add BOTH to
    the right-click context menu.

    Windows Registry Editor Version 5.00
    ; enhance_the_open_command_prompt.reg
    ; This adds Command Prompts and Powershell Prompts sub menus

    [HKEY_CLASSES_ROOT\Directory\Background\shell\01MenuCmd\]
    "ExtendedSubCommandsKey"="Directory\\ContextMenus\\MenuCmd"
    "Icon"="cmd.exe"
    "MUIVerb"="Command Prompts"

    [HKEY_CLASSES_ROOT\Directory\Background\shell\02MenuPowerShell\]
    "ExtendedSubCommandsKey"="Directory\\ContextMenus\\MenuPowerShell"
    "Icon"="powershell.exe"
    "MUIVerb"="PowerShell Prompts"

    [HKEY_CLASSES_ROOT\Directory\Background\shell\cmd\]
    "Extended"=""

    [HKEY_CLASSES_ROOT\Directory\Background\shell\Powershell\]
    "Extended"=""

    [HKEY_CLASSES_ROOT\Directory\ContextMenus\MenuCmd\shell\open\]
    "Icon"="cmd.exe"
    "MUIVerb"="Command Prompt"

    [HKEY_CLASSES_ROOT\Directory\ContextMenus\MenuCmd\shell\open\command\]
    @="cmd.exe /s /k pushd \"%V\""

    [HKEY_CLASSES_ROOT\Directory\ContextMenus\MenuCmd\shell\runas\]
    "Icon"="cmd.exe"
    "MUIVerb"="Command Prompt Elevated"

    [HKEY_CLASSES_ROOT\Directory\ContextMenus\MenuCmd\shell\runas\command\]
    @="cmd.exe /s /k pushd \"%V\""

    [HKEY_CLASSES_ROOT\Directory\ContextMenus\MenuPowerShell\shell\open\]
    "Icon"="powershell.exe"
    "MUIVerb"="PowerShell"

    [HKEY_CLASSES_ROOT\Directory\ContextMenus\MenuPowerShell\shell\open\command\]
    @="powershell.exe -noexit -command Set-Location '%V'"

    [HKEY_CLASSES_ROOT\Directory\ContextMenus\MenuPowerShell\shell\runas\]
    "Icon"="powershell.exe"
    "MUIVerb"="PowerShell Elevated"

    [HKEY_CLASSES_ROOT\Directory\ContextMenus\MenuPowerShell\shell\runas\command\]
    @="powershell.exe -noexit -command Set-Location '%V'"

    [HKEY_CLASSES_ROOT\Directory\shell\01MenuCmd\]
    "ExtendedSubCommandsKey"="Directory\\ContextMenus\\MenuCmd"
    "Icon"="cmd.exe"
    "MUIVerb"="Command Prompts"

    [HKEY_CLASSES_ROOT\Directory\shell\02MenuPowerShell\]
    "ExtendedSubCommandsKey"="Directory\\ContextMenus\\MenuPowerShell"
    "Icon"="powershell.exe"
    "MUIVerb"="PowerShell Prompts"
     
  4. s1ave77

    s1ave77 Has left at his own request

    Aug 15, 2012
    16,104
    24,378
    340
    There is no 'REM' in reg code, to comment use ';'.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  5. bobkush

    bobkush MDL Novice

    May 22, 2017
    21
    44
    0
    Been using them for years - they still work.
     
  6. tistou77

    tistou77 MDL Expert

    Mar 22, 2008
    1,827
    573
    60
    The option for the command prompt in the context menu is already present
    Just enough of the activated, removing a registry key

    In addition, the HKEY_CLASSES_ROOT\xxxx\xxxx\shell\cmd (or HKLM) keys are write-protected
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  7. bobkush

    bobkush MDL Novice

    May 22, 2017
    21
    44
    0
    How to create a Powershell script to add new lines to HOSTS file

    The Windows Hosts file allows you to define which domain names (websites) are linked to which IP addresses. The Windows Hosts file can be used to block websites, redirect them, create shortcuts to websites, create your own local domains, and more. The following instructions explain how to create a .PS1 file to add lines to the HOSTS file.

    #Update hosts file with Powershell - customize this file and save as .ps1

    #This first section checks for admin privileges - add this to top of any ps1 script

    param([switch]$Elevated)

    function Test-Admin {
    $currentUser = New-Object Security.Principal.WindowsPrincipal $([Security.Principal.WindowsIdentity]::GetCurrent())
    $currentUser.IsInRole([Security.Principal.WindowsBuiltinRole]::Administrator)
    }

    if ((Test-Admin) -eq $false) {
    if ($elevated)
    {
    # tried to elevate, did not work, aborting
    }
    else {
    Start-Process powershell.exe -Verb RunAs -ArgumentList ('-noprofile -noexit -file "{0}" -elevated' -f ($myinvocation.MyCommand.Definition))
    }

    exit
    }

    'Running with full admin privileges'

    param([switch]$Elevated)

    function Test-Admin {
    $currentUser = New-Object Security.Principal.WindowsPrincipal $([Security.Principal.WindowsIdentity]::GetCurrent())
    $currentUser.IsInRole([Security.Principal.WindowsBuiltinRole]::Administrator)
    }

    if ((Test-Admin) -eq $false) {
    if ($elevated)
    {
    # tried to elevate, did not work, aborting
    }
    else {
    Start-Process powershell.exe -Verb RunAs -ArgumentList ('-noprofile -noexit -file "{0}" -elevated' -f ($myinvocation.MyCommand.Definition))
    }

    exit
    }

    'Running with full admin privileges'

    # This section adds desired lines to hosts file
    #These commands also check to see if the hosts entries exist before writing new lines.
    # The first command enters a comment # and title for the following hosts entries
    # Customize "# block hostname" ""127.0.0.1 hostname1" and "127.0.0.1 hostname2" to enter
    # the desired block lines. Add more If statements if required for additional entries.

    If ((Get-Content "$($env:windir)\system32\Drivers\etc\hosts" ) -notcontains "# block hostname")
    {ac -Encoding UTF8 "$($env:windir)\system32\Drivers\etc\hosts" "# block hostname" }

    If ((Get-Content "$($env:windir)\system32\Drivers\etc\hosts" ) -notcontains "127.0.0.1 hostname1")
    {ac -Encoding UTF8 "$($env:windir)\system32\Drivers\etc\hosts" "127.0.0.1 hostname1" }

    If ((Get-Content "$($env:windir)\system32\Drivers\etc\hosts" ) -notcontains "127.0.0.1 hostname2")
    {ac -Encoding UTF8 "$($env:windir)\system32\Drivers\etc\hosts" "127.0.0.1 hostname2" }

    #-----------------------------------------------------------
     
  8. GOD666

    GOD666 MDL Expert

    Aug 1, 2015
    1,958
    2,061
    60
    Install CAB files via right click (as opposed to having to manually type it out via cmd or shell)

    Untitled.png


    Save this code as a reg file and run

    Code:
    Windows Registry Editor Version 5.00
    
    [HKEY_CLASSES_ROOT\CABFolder\Shell\RunAs]
    @="Install this update"
    "HasLUAShield"=""
    
    [HKEY_CLASSES_ROOT\CABFolder\Shell\RunAs\Command]
    @="cmd /k dism /online /add-package /packagepath:\"%1\""
    
     
  9. qwesta

    qwesta MDL Senior Member

    Jul 22, 2011
    314
    110
    10
    I need some help please, after uninstalling Cortana, I lost my windows search completely. When I click on it nothing happens. is there any one who can help me here ?
    Thank you
     
  10. s1ave77

    s1ave77 Has left at his own request

    Aug 15, 2012
    16,104
    24,378
    340
    Is actually no-one checking for info prior to removal of components :g:?

    Cortana IS the Start Menu Search, the default Windows search via Explorer still works.

    Two options:

    #1. Reinstall cortana CABs with Trusted Installer Rights (you'll need the correct localized Components for your locale).

    #2. Use Start Menu Replacement (i.e. Classic Shell, StartIsBack++, etc...)
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  11. dhjohns

    dhjohns MDL Guru

    Sep 5, 2013
    3,262
    1,731
    120
    If you want to disable Cortana, but keep search do not uninstall her. Just run this.
    Code:
    Reg.exe add "HKLM\SOFTWARE\Microsoft\Windows Search" /v "AllowCortana" /t REG_DWORD /d "0" /f
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  12. qwesta

    qwesta MDL Senior Member

    Jul 22, 2011
    314
    110
    10
    thank you but I had done so already, do I have to reinstall windows 10 afresh?
     
  13. dhjohns

    dhjohns MDL Guru

    Sep 5, 2013
    3,262
    1,731
    120
    I would. It never takes long to first boot.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  14. Drazick

    Drazick MDL Novice

    Dec 2, 2011
    32
    1
    0
    What exactly does it do?
     
  15. Moksu

    Moksu MDL Novice

    Feb 12, 2017
    20
    8
    0
    Seems like most of the links are dead on the first page. Is there some type of collection of the fixes to use on windows 10?