Windows 10: Difference between revisions

From miki
Jump to navigation Jump to search
Line 83: Line 83:
* Win-R, type <code>shell:startup</code>, Enter, this opens up the Startup folder.
* Win-R, type <code>shell:startup</code>, Enter, this opens up the Startup folder.
* Copy-paste the shortcut of the apps to start in that folder.
* Copy-paste the shortcut of the apps to start in that folder.

=== HDD/SSD to SSD migration (with dual bool) ===
In Windows:
* Disable hibernation (recommended): <code>powercfg -h off</code> (in admin shell).
* Make a recover media (mandatory). Better include system files.

In Ubuntu:
<source lang="bash">
# https://superuser.com/questions/1030208/transferring-windows-10-to-new-hard-drive
sudo lsblk # Find relevant devices
sudo dd if=/dev/sda of=/dev/sdb bs=16M status=progress
</source>

Reboot. Get blue screen. Boot in recovery media. Try auto-repair, but it fails. Go to command line:
<source lang="bash">
sfc /SCANNOW /OFFBOOTDIR=C:\ /OFFWINDIR=C:\Windows # can also set a log file, but mostly useless
</source>

Exit. Try auto-repair again. Should run a chkdsk, but says it fail to fix. Reboot, it should work now.


== Troubleshoot ==
== Troubleshoot ==

Revision as of 01:21, 6 March 2021

See also Windows 8

Tips

Restart in BIOS

  • Click Restart while holding Shift. This should go to advanced restart menu, and select UEFI thingy.
... this works only from LOGIN screen it seems...
  • Press Win key, then search for bios. This should prompt for advanced start-up options.

Restart with USB

  • Click Restart while holding Shift. This should go to advanced restart menu, and select restart in USB thingy.
... this works only from LOGIN screen it seems...

How-to

Disable / remove BitLocker

To remove BitLocker from drive C:

Disable-BitLocker -MountPoint "C:"          # Or: manage-bde -off C:
manage-bde -status
# Wait for completion

To be completed

Shortcut for sleep

  • Press Win-X, then U, then S [1].
  • Press Win-D to show the desktop and make sure no windows is in the focus, then Alt-F4. Select sleep.

Manage sleep

References: [2]

Use powercfg commands:

  • powercfg /requests to show what applications are making requests, that prevents currently the PC to go to sleep.
  • powercfg -lastwake to show the event that triggered the last wake up.
  • powercfg -devicequery wake_armed to view which devices are allowed to wake the PC.
  • powercfg -waketimers to view the wake timers.

To see power related events:

  • Open event viewer.
  • Select Event Viewer (Local) > Windows Logs > System.
  • Right click System, and select Filter Current Log.
  • In even source, select Power-Troubleshooter.

To prevent a device from waking up the PC:

  • Go to Device Manager.
  • Select the devices, then Properties.
  • In the Power Management tab, uncheck Allow this device to wake the computer.

To disable Wake timer:

  • Go to Task Scheduler.
  • Select the task.
  • Uncheck Wake the computer to run this task.

To disable all wake timers:

  • Go to power options.
  • Select Sleep, Allow wake timers, select Disable

To disable wake for maintenance:

  • Go to Security and Maintenance
  • Click the up arrow on the right of Maintenance.
  • This opens up Automatic Maintenance.
  • Uncheck Allow scheduled maintenance to wake up my computer at the scheduled time.

Set default browser via the Command-line

Reference:

Create a script setbrowser.bat, and save it to %APPDATA%\Microsoft\Windows\Start Menu\Programs\Startup:

   "C:\Program Files\SetDefaultBrowser\SetDefaultBrowser.exe" HKLM "Google Chrome"

Create a symbolic link

In Power shell

if (Test-Path "C:\Users\$env:UserName\Some\Path") {
    new-item -itemtype symboliclink -path 'C:\Some\' -name SomeName -value "C:\Users\$env:UserName\Some\Path" -force
}

Add application to startup

  • Win-R, type shell:startup, Enter, this opens up the Startup folder.
  • Copy-paste the shortcut of the apps to start in that folder.

HDD/SSD to SSD migration (with dual bool)

In Windows:

  • Disable hibernation (recommended): powercfg -h off (in admin shell).
  • Make a recover media (mandatory). Better include system files.

In Ubuntu:

# https://superuser.com/questions/1030208/transferring-windows-10-to-new-hard-drive
sudo lsblk  # Find relevant devices
sudo dd if=/dev/sda of=/dev/sdb bs=16M status=progress

Reboot. Get blue screen. Boot in recovery media. Try auto-repair, but it fails. Go to command line:

sfc /SCANNOW /OFFBOOTDIR=C:\ /OFFWINDIR=C:\Windows # can also set a log file, but mostly useless

Exit. Try auto-repair again. Should run a chkdsk, but says it fail to fix. Reboot, it should work now.

Troubleshoot

Search bar not responding in start menu

Must disable Bing search:

REG ADD HKCU\Software\Microsoft\Windows\CurrentVersion\Search /v BingSearchEnabled /t REG_DWORD /d 0 /f
REG ADD HKCU\Software\Microsoft\Windows\CurrentVersion\Search /v CortanaConsent /t REG_DWORD /d 0 /f