Miscellaneous about Windows

Auto startup folders in Windows 10

In the explorer, type:

  • shell:startup for the user's folder,
  • shell:common startup for the folder common to all users.

The programs put in this folders are launched when opening a Windows 10 session.

Port 80 used under Windows 10

Despite the user has no launched an HTTP server, the port 80 is in use, as can be seen with netstat. This is due to a service called W3SVC (group iissvcs).

Don't know what the purpose of this service is (don't really search…). Deactivating it seems not to be a problem…

Searching for a file

To retrieve only files with a given name, type system.filename:<file name> in the search text box from the file explorer (you might also retrieve files which name begin with the given pattern).

The 'hosts' file

The hosts file will be found under Windows at C:\Windows\System32\drivers\etc\hosts. This file can be mklinked (mklink C:\Windows\System32\drivers\etc\hosts …).

For the modification in this file to be taken into account, it could be necessary to clear the DNS cache, by launching ipconfig /flushdns.

Logged in with a temporary account

(From https://appuals.com/best-fix-how-to-fix-temporary-profile-issues-in-windows-10/.)

If Windows is unable to connect to your usual account and instead logged you in a temporary account, even after restarting the computer, remove the .bak extension from the HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList\(long number).bak registry entry, after renaming (or deleting) the same entry without the .bak extension, and restart the computer.

Changing account user name

Launch netplwiz.

Assigning drive letter to folder (persistently)

(From http://superuser.com/questions/29072/how-to-make-subst-mapping-persistent-across-reboots.)

In the registry, at HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\DOS Devices, add a string value with, as name, the drive letter with the colon (:), and, as value, \??\ followed by the folder (example : \??\C:\Documents and Settings\All Users\Shared Documents). Reboot.

The assignation of a drive letter to with subst command does not survive to a boot.

Turn Off Your Monitor With a Keyboard Shortcut

https://www.alphr.com/turn-off-monitor-with-keyboard/

Create a shortcut with following target:

powershell.exe -Command “(Add-Type '[DllImport(\”user32.dll\“)]public static extern int SendMessage(int hWnd,int hMsg,int wParam,int lParam);' -Name a -Pas)::SendMessage(-1,0x0112,0xF170,2)”