Skip to content

Instantly share code, notes, and snippets.

View pochtar's full-sized avatar

Max Pochtar pochtar

View GitHub Profile
@pochtar
pochtar / hotspot.cmd
Created August 30, 2022 01:21 — forked from primaryobjects/hotspot-keep-alive.ps1
Script to Enable Windows 10 Mobile Hotspot Automatically After Reboot
PowerShell -Command "Set-ExecutionPolicy Unrestricted" >> "%TEMP%\StartupLog.txt" 2>&1
PowerShell C:\Users\YOUR_USERNAME\Desktop\hotspot.ps1 >> "%TEMP%\StartupLog.txt" 2>&1
@pochtar
pochtar / close_access.bat
Created June 24, 2021 18:41
Close & open access to a website hosts scripts
@echo off
set LIST=(vk.com www.vk.com)
set _list=%LIST:~1,-1%
for %%G in (%_list%) do (
SET NEWLINE=^& echo.
type %WINDIR%\System32\drivers\etc\hosts | findstr /v %%G > tmp.txt
ECHO 127.0.0.1 %%G>>tmp.txt
copy /b/v/y tmp.txt %WINDIR%\System32\drivers\etc\hosts
del tmp.txt
)
@pochtar
pochtar / Remove All User Folders From This PC 64-bit.reg
Created June 16, 2018 14:04
Remove/Restore All User Folders To This PC 64-bit
Windows Registry Editor Version 5.00
; Remove Desktop From This PC
[-HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{B4BFCC3A-DB2C-424C-B029-7FE99A87C641}]
[-HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{B4BFCC3A-DB2C-424C-B029-7FE99A87C641}]
; Remove Documents From This PC
[-HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{A8CDFF1C-4878-43be-B5FD-F8091C1C60D0}]
[-HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{d3162b92-9365-467a-956b-92703aca08af}]
[-HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{A8CDFF1C-4878-43be-B5FD-F8091C1C60D0}]
[-HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{d3162b92-9365-467a-956b-92703aca08af}]
@pochtar
pochtar / Open PowerShell window here.reg
Last active June 14, 2018 20:17
"Open PowerShell window here" context menu in a folder, on a folder and on a drive
Windows Registry Editor Version 5.00
[-HKEY_CLASSES_ROOT\Directory\shell\PowershellMenu]
[-HKEY_CLASSES_ROOT\Directory\Background\shell\PowershellMenu]
[-HKEY_CLASSES_ROOT\Drive\shell\PowershellMenu]
[HKEY_CLASSES_ROOT\Directory\shell\PowershellMenu]
@="Open PowerShell window here"
"NoWorkingDirectory"=""