Created
July 1, 2022 05:06
-
-
Save maciakl/0898c9eb995531883fdf47a4f25e6d60 to your computer and use it in GitHub Desktop.
Interactive helper script to change Registered Owner and Registered Organization registry values.
This file contains hidden or 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
@echo off | |
if "%1" == "elevated" goto start | |
powershell -command "Start-Process %~nx0 elevated -Verb runas" | |
goto :eof | |
:start | |
@echo off | |
cls | |
echo. | |
echo Branding Helper | |
echo =============== | |
echo. | |
CALL :CHECK | |
echo. | |
choice /M "Brand or Quit" /C BQ | |
if %ERRORLEVEL% == 1 ( CALL :BRAND ) | |
if %ERRORLEVEL% == 2 ( goto :eof ) | |
goto :start | |
:BRAND | |
call :GETNAME | |
call :GETORG | |
reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion" /v RegisteredOwner /t REG_SZ /d "%name%" /f | |
reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion" /v RegisteredOrganization /t REG_SZ /d "%org%" /f | |
echo. | |
goto :eof | |
:CHECK | |
echo. | |
reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion" /v RegisteredOwner | |
reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion" /v RegisteredOrganization | |
echo. | |
goto :eof | |
:GETNAME | |
set /P name=Enter name, then press ENTER: | |
goto :eof | |
:GETNAME | |
set /P org=Enter organization, then press ENTER: | |
goto :eof |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment