Windows 10-Reg failovi

Učlanjen(a)
28.02.2012
Poruka
5.199
Context Menu Control Panel

Picture1.png


Kod:
@echo off
CLS
color 1f

REM *** IMPORTANT ***
REM If you wish to use in UserTweaks.cmd or for being called from SetupComplete.cmd remove
REM the :: from the line with ':: GOTO :CPanelRoutine' failure to do this will cause Windows
REM Setup to 'hang' as it will be asking for user input but nothing will be shown on the
REM display due to the way Oobe is designed.

:: GOTO :CPanelRoutine

TITLE Checking for Admin...
echo.
cd %systemroot%\system32
call :IsAdmin

TITLE Control Panel Context Menu
cls
color 1f
echo.
REM Enable Unicode
chcp 65001 >nul
echo.
echo Note: This will be hopefully auto translated to your OS language.
echo.

SET /p "CPanelCM=Add Control Panel to the Desktop Context Menu ? {Y/N} "
echo.
IF /I "%CPanelCM%" NEQ "Y" echo Control Panel NOT added. & echo. & GOTO :Done

REM CPCTLocation (default Bottom) is the area on the Context Menu you wish to place the 'link'
REM Top , Middle, Bottom are the only options and may default to Middle or Bottom if spelt wrong.

:CPanelRoutine
SET "CPCTLocation=Top"

REM If you wish to remove the link from the Context Menu copy/paste the REG DELETE line below into a Admin Command Prompt.

REM Remove CPanel Context Menu
Reg delete "HKCR\DesktopBackground\Shell\ControlPanel" /f >nul 2>&1


REM Now add the CPanel to Context Menu...
Reg add "HKCR\DesktopBackground\Shell\ControlPanel" /v "MUIVerb" /t REG_SZ /d "@%SystemRoot%\system32\shell32.dll,-4161" /f >nul 2>&1
Reg add "HKCR\DesktopBackground\Shell\ControlPanel" /v "SubCommands" /t REG_SZ /d "" /f >nul 2>&1
Reg add "HKCR\DesktopBackground\Shell\ControlPanel" /v "Icon" /t REG_SZ /d "imageres.dll,-27" /f >nul 2>&1
IF /I "%CPCTLocation%" NEQ "Top" IF /I "%CPCTLocation%" NEQ "Middle" IF /I "%CPCTLocation%" NEQ "Bottom" SET "CPCTLocation=Top"
Reg add "HKCR\DesktopBackground\Shell\ControlPanel" /v "Position" /t REG_SZ /d "%CPCTLocation%" /f >nul 2>&1
Reg add "HKCR\DesktopBackground\Shell\ControlPanel\shell\001flyout" /ve /t REG_SZ /d "@%SystemRoot%\system32\shell32.dll,-31061" /f >nul 2>&1
Reg add "HKCR\DesktopBackground\Shell\ControlPanel\shell\001flyout" /v "Icon" /t REG_SZ /d "imageres.dll,-27" /f >nul 2>&1
Reg add "HKCR\DesktopBackground\Shell\ControlPanel\shell\001flyout\command" /ve /t REG_SZ /d "explorer.exe shell:::{26EE0668-A00A-44D7-9371-BEB064C98683}" /f >nul 2>&1
Reg add "HKCR\DesktopBackground\Shell\ControlPanel\shell\002flyout" /ve /t REG_SZ /d "@%SystemRoot%\system32\shell32.dll,-32012" /f >nul 2>&1
Reg add "HKCR\DesktopBackground\Shell\ControlPanel\shell\002flyout" /v "Icon" /t REG_SZ /d "imageres.dll,-27" /f >nul 2>&1
Reg add "HKCR\DesktopBackground\Shell\ControlPanel\shell\002flyout\command" /ve /t REG_SZ /d "explorer.exe shell:::{21EC2020-3AEA-1069-A2DD-08002B30309D}" /f >nul 2>&1
Reg add "HKCR\DesktopBackground\Shell\ControlPanel\shell\003flyout" /ve /t REG_SZ /d "@%SystemRoot%\system32\shell32.dll,-32537" /f >nul 2>&1
Reg add "HKCR\DesktopBackground\Shell\ControlPanel\shell\003flyout" /v "Icon" /t REG_SZ /d "imageres.dll,-27" /f >nul 2>&1
Reg add "HKCR\DesktopBackground\Shell\ControlPanel\shell\003flyout\command" /ve /t REG_SZ /d "explorer.exe shell:::{ED7BA470-8E54-465E-825C-99712043E01C}" /f >nul 2>&1

echo.
echo Done.

:Done
echo.
echo No reboot or log out is required. Exiting in 5 seconds.
echo.
TIMEOUT /T 5 /NoBreak >nul
GOTO :EOF
=====================================================================================
:IsAdmin
Reg.exe query "HKU\S-1-5-19\Environment"
If Not %ERRORLEVEL% EQU 0 (
Cls & echo. & Echo You must have administrator rights to continue ... & echo.
Pause & Exit
)
Cls

exit /b

Spasiti skriptu kao ContextMenu_ControlPanel.cmd
 
Učlanjen(a)
28.02.2012
Poruka
5.199
Change Computer Name

Kod:
@echo off
CLS
color 1f
TITLE Checking for Admin...
echo.
cd %systemroot%\system32
call :IsAdmin

TITLE TakeOwnership Context Menu
cls
color 1f
echo.

set /p "NewCName=Please enter your new computer/device name: "

echo Modifying registry keys...
echo.
reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\ComputerName\ActiveComputerName" /v "ComputerName" /d "%NewCName%" -f >NUL 2>&1
reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\ComputerName\ComputerName" /v "ComputerName" /d "%NewCName%" -f >NUL 2>&1
reg add "HKEY_LOCAL_MACHINE\SYSTEM\ControlSet002\Control\ComputerName\ComputerName" /v "ComputerName" /d "%NewCName%" -f >NUL 2>&1
reg add "HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\ComputerName\ActiveComputerName" /v "ComputerName" /d "%NewCName%" -f >NUL 2>&1
reg add "HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\ComputerName\ComputerName" /v "ComputerName" /d "%NewCName%" -f >NUL 2>&1
reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\Tcpip\Parameters" /v "Hostname" /d "%NewCName%" -f >NUL 2>&1
reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\Tcpip\Parameters" /v "NV Hostname" /d "%NewCName%" -f >NUL 2>&1
reg add "HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\services\Tcpip\Parameters" /v "Hostname" /d "%NewCName%" -f >NUL 2>&1
reg add "HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\services\Tcpip\Parameters" /v "NV Hostname" /d "%NewCName%" -f >NUL 2>&1
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v "DefaultDomainName" /d "%NewCName%" -f >NUL 2>&1
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v "AltDefaultDomainName" /d "%NewCName%" -f >NUL 2>&1

echo Finished updating the registry...
echo.
echo Update the DNS...
ipconfig /renew
ipconfig /flushdns
ipconfig /registerdns
echo.
echo Finish updating DNS...

set "computername=%NewCName%"

echo.
echo Done.
echo.
Pause
exit

=====================================================================================
:IsAdmin
Reg query "HKU\S-1-5-19\Environment"
If Not %ERRORLEVEL% EQU 0 (
 Cls & echo. & Echo You must have administrator rights to continue ... & echo.
 Pause & Exit
)
Cls

exit /b

Spasiti skriptu kao ChangeComputerName.cmd
 
Učlanjen(a)
28.02.2012
Poruka
5.199
Add Shut Down With Options Context Menu in Windows 10


1.JPG
Add Shut Down to Desktop Context Menu

Kod:
Windows Registry Editor Version 5.00

; Created by: Shawn Brink
; Created on: October 27th 2017
; Tutorial: https://www.tenforums.com/tutorials/96619-add-shut-down-context-menu-windows-10-a.html

[HKEY_CLASSES_ROOT\DesktopBackground\Shell\Shutdown]
"Icon"="shell32.dll,-28"
"MUIVerb"="Power"
"Position"="Bottom"
"SubCommands"=""

[HKEY_CLASSES_ROOT\DesktopBackground\Shell\Shutdown\shell\001flyout]
"MUIVerb"="Force apps to close, and shutdown PC with no time-out or warning"

[HKEY_CLASSES_ROOT\DesktopBackground\Shell\Shutdown\shell\001flyout\command]
@="shutdown /s /f /t 0"

[HKEY_CLASSES_ROOT\DesktopBackground\Shell\Shutdown\shell\002flyout]
"MUIVerb"="Shutdown PC with warning"
"CommandFlags"=dword:00000020

[HKEY_CLASSES_ROOT\DesktopBackground\Shell\Shutdown\shell\002flyout\command]
@="shutdown /s"

[HKEY_CLASSES_ROOT\DesktopBackground\Shell\Shutdown\shell\003flyout]
"MUIVerb"="Turn off PC with no time-out or warning, but prompt to save any unsaved work"
"CommandFlags"=dword:00000020

[HKEY_CLASSES_ROOT\DesktopBackground\Shell\Shutdown\shell\003flyout\command]
@="shutdown /p"

[HKEY_CLASSES_ROOT\DesktopBackground\Shell\Shutdown\shell\004flyout]
"MUIVerb"="Shutdown PC and prepares it for fast startup"
"CommandFlags"=dword:00000020

[HKEY_CLASSES_ROOT\DesktopBackground\Shell\Shutdown\shell\004flyout\command]
@="shutdown /s /hybrid /t 0"

[HKEY_CLASSES_ROOT\DesktopBackground\Shell\Shutdown\shell\005flyout]
"MUIVerb"="Force apps to close, shutdown PC, and prepares it for fast startup"

[HKEY_CLASSES_ROOT\DesktopBackground\Shell\Shutdown\shell\005flyout\command]
@="shutdown /s /hybrid /f /t 0"

[HKEY_CLASSES_ROOT\DesktopBackground\Shell\Shutdown\shell\006flyout]
"MUIVerb"="Shutdown PC. On next boot, restart any opened registered apps"
"CommandFlags"=dword:00000020

[HKEY_CLASSES_ROOT\DesktopBackground\Shell\Shutdown\shell\006flyout\command]
@="shutdown /sg /t 0"

[HKEY_CLASSES_ROOT\DesktopBackground\Shell\Shutdown\shell\007flyout]
"MUIVerb"="Slide to shut down PC"
"CommandFlags"=dword:00000020

[HKEY_CLASSES_ROOT\DesktopBackground\Shell\Shutdown\shell\007flyout\command]
@="SlideToShutDown.exe"


Remove Shut Down to Desktop Context Menu DEFAULT

Kod:
Windows Registry Editor Version 5.00

; Created by: Shawn Brink
; Created on: October 27th 2017
; Tutorial: https://www.tenforums.com/tutorials/96619-add-shut-down-context-menu-windows-10-a.html



[-HKEY_CLASSES_ROOT\DesktopBackground\Shell\Shutdown]

Spasiti kao reg.fail
 
Natrag
Top