Last active
March 23, 2024 14:11
-
-
Save wincmd64/e357bd54a4e7883c9a1b49f4c0ee0970 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
:: Windows 7 quick setup | |
:: The encoding of this file must be OEM 866 | |
:: https://t.me/wincmd64 | |
:: Tested on: https://nnmclub.to/forum/tracker.php?pid=1428251 | |
:: Drivers can be found at: https://sdi-tool.org | |
@echo off | |
:: UAC check | |
NET SESSION | |
IF %ERRORLEVEL% NEQ 0 GOTO ELEVATE | |
GOTO ADMINTASKS | |
:ELEVATE | |
CD /d %~dp0 | |
MSHTA "javascript: var shell = new ActiveXObject('shell.application'); shell.ShellExecute('%~nx0', '', '', 'runas', 1);close();" | |
exit | |
:ADMINTASKS | |
cls | |
:: check win ver | |
>nul 2>&1 (copy /l nul nul && cmd.exe /e:on /c for /f "delims=[ tokens=2" %%A in ('ver'^) do for /f "tokens=2,3 delims=. " %%B in ("%%A"^) do if %%B==6 if 2 gtr %%C call) && color 4 && echo The detected system is newer than Windows 7. && echo STILL RUN THE SCRIPT ? && echo. || echo RUN SCRIPT ? && echo. | |
pause | |
@echo on | |
:: ========== COMMON ========== | |
:: Отключает гибернацию и удаляет файл C:\hiberfil.sys | |
powercfg -h off | |
:: Панель управления > Электропитание. Схема питания "Высокая производительность" | |
powercfg /S 8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c | |
:: Не отключать жесткий диск | https://www.tenforums.com/tutorials/21454-turn-off-hard-disk-after-idle-windows-10-a.html | |
powercfg -change -disk-timeout-ac 0 | |
:: Панель управления. Крупные значки | |
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\ControlPanel" /v StartupPage /t REG_DWORD /d 1 /f | |
:: Панель управления > Звуки. OFF "Проигрывать мелодию запуска Windows" | |
reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Authentication\LogonUI\BootAnimation" /v DisableStartupSound /t REG_DWORD /d 1 /f | |
:: Проводник. Всегда показывать расширения файлов | |
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v HideFileExt /t REG_DWORD /d 0 /f | |
:: Проводник. Отключить префикс " - ярлык" при создании новых ярлыков | |
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\NamingTemplates" /v ShortcutNameTemplate /d \"%%s.lnk\" /f | |
:: Панель задач. Увеличить скорость открытия миниатюр | |
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v ExtendedUIHoverTime /t REG_DWORD /d 100 /f | |
:: Панель задач. Переходить на последнее открытое окно при клике по сгруппированным приложениям | |
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v LastActiveClick /t REG_DWORD /d 1 /f | |
:: ...или вовсе не группировать (для 7 и 10) | |
:: reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v TaskbarGlomLevel /t REG_DWORD /d 2 /f | |
:: Определяет положение переключателей в окне Быстродействие (SystemPropertiesPerformance.exe) | |
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\VisualEffects" /v VisualFXSetting /t REG_DWORD /d 3 /f | |
reg add "HKCU\Control Panel\Desktop" /v UserPreferencesMask /t REG_BINARY /d 9032078010000000 /f | |
reg add "HKCU\Control Panel\Desktop\WindowMetrics" /v MinAnimate /d 0 /f | |
:: Отключает блокировку скачанных файлов. https://habr.com/ru/post/505194/ | |
reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Attachments" /v SaveZoneInformation /t REG_DWORD /d 1 /f | |
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Attachments" /v SaveZoneInformation /t REG_DWORD /d 1 /f | |
:: Файлы как текстовые | |
assoc .=txtfile | |
assoc .wer=txtfile | |
:: Добавляет в shift+меню всех файлов пункт "Открыть в Блокноте" | |
reg add "HKCR\*\shell\Открыть в Блокноте" /v "Icon" /d "%%systemroot%%\System32\notepad.exe" /f | |
reg add "HKCR\*\shell\Открыть в Блокноте" /v "Extended" /f | |
reg add "HKCR\*\shell\Открыть в Блокноте\command" /ve /d "notepad.exe %%1" /f | |
:: ========== LOCAL NETWORK ========== | |
netsh advfirewall firewall set rule group="Обнаружение сети" new enable=Yes | |
:: RDP | |
reg add "HKLM\SYSTEM\CurrentControlSet\Control\Terminal Server" /v fDenyTSConnections /t REG_DWORD /d 0 /f | |
netsh advfirewall firewall set rule group="Дистанционное управление рабочим столом" new enable=Yes | |
:: ========== WORKGROUP ========== | |
:: net user Гость /active:yes | |
:: netsh advfirewall firewall set rule group="Общий доступ к файлам и принтерам" new enable=Yes | |
:: netsh advfirewall firewall set rule group="Инструментарий управления Windows (wmi)" new enable=yes | |
:: win10+ | |
:: reg add "HKLM\SYSTEM\CurrentControlSet\Services\LanmanWorkstation\Parameters" /v AllowInsecureGuestAuth /t REG_DWORD /d 1 /f | |
:: Отключает Master Browser (win10+). Альтернативный вариант -- https://habr.com/ru/articles/680896 | |
:: reg add "HKLM\SYSTEM\CurrentControlSet\Services\Browser\Parameters" /v IsDomainMaster /d FALSE /f | |
:: reg add "HKLM\SYSTEM\CurrentControlSet\Services\Browser\Parameters" /v MaintainServerList /d NO /f | |
:: Ошибка 0x0000011b при подключении к принтеру | |
:: reg add "HKLM\System\CurrentControlSet\Control\Print" /v RpcAuthnLevelPrivacyEnabled /t REG_DWORD /d 0 /f | |
:: Ошибка 0x00000bcb при подключении к принтеру | |
:: reg add "HKLM\Software\Policies\Microsoft\Windows NT\Printers\PointAndPrint" /v RestrictDriverInstallationToAdministrators /t REG_DWORD /d 0 /f | |
:: access admin share with UAC enabled | |
::reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\system" /v LocalAccountTokenFilterPolicy /t REG_DWORD /d 1 /f | |
:: Панель задач. Отключить уведомление "Цветовая схема изменена на Windows 7 - упрощенный стиль" | |
reg add "HKCU\Software\Microsoft\Windows\DWM" /v SuppressDisableCompositionUI /t REG_DWORD /d 1 | |
:: Вид меню Пуск | |
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v Start_ShowDownloads /t REG_DWORD /d 1 /f | |
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v Start_ShowRun /t REG_DWORD /d 1 /f | |
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v StartMenuAdminTools /t REG_DWORD /d 1 /f | |
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v Start_AdminToolsRoot /t REG_DWORD /d 2 /f | |
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v Start_ShowUser /t REG_DWORD /d 0 /f | |
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v Start_ShowMyDocs /t REG_DWORD /d 0 /f | |
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v Start_ShowMyMusic /t REG_DWORD /d 0 /f | |
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v Start_ShowMyPics /t REG_DWORD /d 0 /f | |
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v Start_ShowHelp /t REG_DWORD /d 0 /f | |
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v Start_ShowSetProgramAccessAndDefaults /t REG_DWORD /d 0 /f | |
:: Блокнот. Отображать строку состояния | |
reg add "HKCU\Software\Microsoft\Notepad" /v StatusBar /t REG_DWORD /d 1 /f | |
:: En Ru Ua и Ctrl+Shift | |
reg add "HKCU\Keyboard Layout\Preload" /v 1 /d 00000409 /f | |
reg add "HKCU\Keyboard Layout\Preload" /v 2 /d 00000419 /f | |
reg add "HKCU\Keyboard Layout\Preload" /v 3 /d 00000422 /f | |
reg add "HKCU\Keyboard Layout\Toggle" /v "Language Hotkey" /d 2 /f | |
:: En Ru Ua и Ctrl+Shift для Logon Screen | |
reg add "HKU\.DEFAULT\Keyboard Layout\Preload" /v 1 /d 00000409 /f | |
reg add "HKU\.DEFAULT\Keyboard Layout\Preload" /v 2 /d 00000419 /f | |
reg add "HKU\.DEFAULT\Keyboard Layout\Preload" /v 3 /d 00000422 /f | |
reg add "HKU\.DEFAULT\Keyboard Layout\Toggle" /v "Language Hotkey" /d 2 /f | |
:: Вид консоли | |
reg add HKCU\Console\%%SystemRoot%%_system32_cmd.exe /v FaceName /d Consolas /f | |
reg add HKCU\Console\%%SystemRoot%%_system32_cmd.exe /v FontSize /t REG_DWORD /d 1048576 /f | |
reg add HKCU\Console\%%SystemRoot%%_system32_cmd.exe /v FontWeight /t REG_DWORD /d 400 /f | |
reg add HKCU\Console\%%SystemRoot%%_system32_cmd.exe /v ScreenBufferSize /t REG_DWORD /d 19660920 /f | |
reg add HKCU\Console\%%SystemRoot%%_system32_cmd.exe /v WindowSize /t REG_DWORD /d 1638520 /f | |
:: Вид консоли - Выделение мышью | |
reg add HKCU\Console\%%SystemRoot%%_system32_cmd.exe /v QuickEdit /t REG_DWORD /d 1 /f | |
:: Вид PowerShell (минуя "Windows PowerShell.lnk") | |
reg add HKCU\Console\%%SystemRoot%%_System32_WindowsPowerShell_v1.0_powershell.exe /v FaceName /d "Lucida Console" /f | |
reg add HKCU\Console\%%SystemRoot%%_System32_WindowsPowerShell_v1.0_powershell.exe /v FontSize /t REG_DWORD /d 786432 /f | |
reg add HKCU\Console\%%SystemRoot%%_System32_WindowsPowerShell_v1.0_powershell.exe /v FontWeight /t REG_DWORD /d 400 /f | |
reg add HKCU\Console\%%SystemRoot%%_System32_WindowsPowerShell_v1.0_powershell.exe /v ScreenBufferSize /t REG_DWORD /d 19660920 /f | |
reg add HKCU\Console\%%SystemRoot%%_System32_WindowsPowerShell_v1.0_powershell.exe /v WindowSize /t REG_DWORD /d 3276920 /f | |
reg add HKCU\Console\%%SystemRoot%%_System32_WindowsPowerShell_v1.0_powershell.exe /v ColorTable00 /t REG_DWORD /d 5645313 /f | |
reg add HKCU\Console\%%SystemRoot%%_System32_WindowsPowerShell_v1.0_powershell.exe /v ColorTable07 /t REG_DWORD /d 15789550 /f | |
reg add HKCU\Console\%%SystemRoot%%_System32_WindowsPowerShell_v1.0_powershell.exe /v ColorTable05 /t REG_DWORD /d 8421376 /f | |
:: Панель управления > Мышь. Схема курсоров "Windows Aero (крупный)" | |
reg add "HKCU\Control Panel\Cursors" /ve /d "Windows Aero (крупный)" /f | |
reg add "HKCU\Control Panel\Cursors" /v "AppStarting" /t REG_EXPAND_SZ /d "%%SystemRoot%%\cursors\aero_working_l.ani" /f | |
reg add "HKCU\Control Panel\Cursors" /v "Arrow" /t REG_EXPAND_SZ /d "%%SystemRoot%%\cursors\aero_arrow_l.cur" /f | |
reg add "HKCU\Control Panel\Cursors" /v "Hand" /t REG_EXPAND_SZ /d "%%SystemRoot%%\cursors\aero_link_l.cur" /f | |
reg add "HKCU\Control Panel\Cursors" /v "Help" /t REG_EXPAND_SZ /d "%%SystemRoot%%\cursors\aero_helpsel_l.cur" /f | |
reg add "HKCU\Control Panel\Cursors" /v "No" /t REG_EXPAND_SZ /d "%%SystemRoot%%\cursors\aero_unavail_l.cur" /f | |
reg add "HKCU\Control Panel\Cursors" /v "NWPen" /t REG_EXPAND_SZ /d "%%SystemRoot%%\cursors\aero_pen_l.cur" /f | |
reg add "HKCU\Control Panel\Cursors" /v "SizeAll" /t REG_EXPAND_SZ /d "%%SystemRoot%%\cursors\aero_move_l.cur" /f | |
reg add "HKCU\Control Panel\Cursors" /v "SizeNESW" /t REG_EXPAND_SZ /d "%%SystemRoot%%\cursors\aero_nesw_l.cur" /f | |
reg add "HKCU\Control Panel\Cursors" /v "SizeNS" /t REG_EXPAND_SZ /d "%%SystemRoot%%\cursors\aero_ns_l.cur" /f | |
reg add "HKCU\Control Panel\Cursors" /v "SizeNWSE" /t REG_EXPAND_SZ /d "%%SystemRoot%%\cursors\aero_nwse_l.cur" /f | |
reg add "HKCU\Control Panel\Cursors" /v "SizeWE" /t REG_EXPAND_SZ /d "%%SystemRoot%%\cursors\aero_ew_l.cur" /f | |
reg add "HKCU\Control Panel\Cursors" /v "UpArrow" /t REG_EXPAND_SZ /d "%%SystemRoot%%\cursors\aero_up_l.cur" /f | |
reg add "HKCU\Control Panel\Cursors" /v "Wait" /t REG_EXPAND_SZ /d "%%SystemRoot%%\cursors\aero_busy_l.ani" /f | |
:: UAC (1 вкл. 0 выкл.) | |
reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" /v EnableLUA /t REG_DWORD /d 1 /f | |
:: без заморозки (предпоследнее положение ползунка) | |
reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" /v PromptOnSecureDesktop /t REG_DWORD /d 0 /f | |
reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" /v ConsentPromptBehaviorAdmin /t REG_DWORD /d 5 /f | |
:: Отключает поиск в сети Интернет при открытии файла с неизвестным расширением | |
reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer" /v NoInternetOpenWith /t REG_DWORD /d 1 /f | |
:: Отключает службу "Центр обеспечения безопасности" | |
sc stop "wscsvc" && sc config "wscsvc" start= disabled | |
:: Отключает задания в планировщике | |
schtasks /Change /DISABLE /TN "\Microsoft\Windows\Defrag\ScheduledDefrag" | |
schtasks /Change /DISABLE /TN "\Microsoft\Windows\MobilePC\HotStart" | |
schtasks /Change /DISABLE /TN "\Microsoft\Windows\Maintenance\WinSAT" | |
schtasks /Change /DISABLE /TN "\Microsoft\Windows\MUI\LPRemove" | |
schtasks /Change /DISABLE /TN "\Microsoft\Windows\SoftwareProtectionPlatform\SvcRestartTask" | |
:: Добавляем ярлыки в Избранное проводника | |
powershell "$s=(New-Object -COM WScript.Shell).CreateShortcut('%userprofile%\Links\AppData.lnk');$s.TargetPath='shell:appdata';$s.Save()" | |
powershell "$s=(New-Object -COM WScript.Shell).CreateShortcut('%userprofile%\Links\User Temp.lnk');$s.TargetPath='shell:Local AppData\temp';$s.Save()" | |
powershell "$s=(New-Object -COM WScript.Shell).CreateShortcut('%userprofile%\Links\Report Archive.lnk');$s.TargetPath='%ProgramData%\Microsoft\Windows\WER\';$s.Save()" | |
:: Разрешить юзерам менять системное время -- http://kaktusenok.blogspot.com/2012/08/windows_16.html | |
if exist "%~dp0ntrights.exe" ("%~dp0ntrights.exe" +r SeSystemtimePrivilege -u "Прошедшие проверку") | |
pause |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment