Skip to content

Instantly share code, notes, and snippets.

@Aebian
Created October 10, 2020 22:27
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Aebian/8c2b6b7d3793aec307d56f1a12ec55fc to your computer and use it in GitHub Desktop.
Save Aebian/8c2b6b7d3793aec307d56f1a12ec55fc to your computer and use it in GitHub Desktop.
@echo off
setlocal
echo:
echo Setting OEMID in RegEdit...
REG ADD "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Store" /v OEMID /f /t REG_SZ /d DELL
echo:
echo Setting SCMID...
echo Fetching System Model Name
for /f "tokens=2 delims==" %%a in ('wmic computersystem get model /format:list') do set SYSMODEL=%%a
set SYSMODEL=%SYSMODEL: =%
echo System Model Name is "%SYSMODEL%"
if not "x%SYSMODEL:Alienware=%" == "x%SYSMODEL%" goto modelAlienware
if not "x%SYSMODEL:Vostro=%" == "x%SYSMODEL%" goto modelVostro
if not "x%SYSMODEL:XPS=%" == "x%SYSMODEL%" goto modelXPS
if not "x%SYSMODEL:Inspiron=%" == "x%SYSMODEL%" goto modelInspiron
:modelAlienware
echo System model contains the name Alienware
set SYSNAME=Alienware
goto modelFinish
:modelVostro
echo System model contains the name Vostro
set SYSNAME=Vostro
goto modelFinish
:modelXPS
echo System model contains the name Xps
set SYSNAME=Xps
goto modelFinish
:modelInspiron
echo System model contains the name Inspiron
set SYSNAME=Inspiron
goto modelFinish
:modelFinish
echo System Name is %SYSNAME%
set SCMID=DELL_%SYSNAME%
echo SCMID to be set is %SCMID%
echo Setting SCMID in RegEdit
REG ADD "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Store" /v StoreContentModifier /f /t REG_SZ /d %SCMID%
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment