Skip to content

Instantly share code, notes, and snippets.

@maciakl
Created July 1, 2022 05:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save maciakl/0898c9eb995531883fdf47a4f25e6d60 to your computer and use it in GitHub Desktop.
Save maciakl/0898c9eb995531883fdf47a4f25e6d60 to your computer and use it in GitHub Desktop.
Interactive helper script to change Registered Owner and Registered Organization registry values.
@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