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

:StartScript
chcp 65001 > nul
SET "NewCName="
SET "YN="
TITLE Change Model Name
cls
color 1f
echo.
echo Due to batch script unicode decoding problems your text may look
echo wrong, but your new model name will be correct once entered into
echo the registry.
echo.
echo Certain characters are not allowed and will be removed.
echo.
echo Pressing just enter without entering anything will close script.
echo.

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

IF NOT DEFINED NewCName GOTO :DoneScript

REM Misc other Disallowed characters to remove/change.
REM There are limitations with batch scripting for certain special
REM characters which cannot be filtered.

SET "NewCName=%NewCName:(=%"
SET "NewCName=%NewCName:)=%"
SET "NewCName=%NewCName:\=%"
SET "NewCName=%NewCName:/=%"
SET NewCName=%NewCName:^*=-%
SET "NewCName=%NewCName:?=%"
SET "NewCName=%NewCName::=%"
SET NewCName=%NewCName:"=%
SET "NewCName=%NewCName:^^=%"
SET "NewCName=%NewCName:!=%"
SET "NewCName=%NewCName:@=%"
SET "NewCName=%NewCName:#=%"
SET "NewCName=%NewCName:^&=%"

:AskLoop
CLS
echo.
echo Note: On non Latin Based Character sets the text may look odd.
echo.
echo New Model Name: %NewCName%
echo.
set /p "YN=Is this correct {Y/N and press Enter}: "
IF /I "%YN%"=="N" GOTO :StartScript
IF /I "%YN%"=="Y" GOTO :ActionRequest
GOTO :AskLoop

:ActionRequest
CLS
echo.
echo Modifying registry keys...
echo.
REG add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\OEMInformation" /v "Model" /t REG_SZ /d "%NewCName%" /f >NUL 2>&1
echo Finished updating the registry...
echo.

echo.
echo Done.
echo.
Pause
exit

:DoneScript
echo.
echo Nothing entered - script ended.
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