You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
I've made a batch file that do the activation.
here's the code :
!!!!!!!!!!!!! Start !!!!!!!!!!!!!!! @echo off
setlocal
:: Define the help message
set HELP_MESSAGE=Usage: activate.bat [parameter]
::echo Possible parameters: h (home), p (professionnal), e (enterprise), d (education)
:: Check if a parameter was provided
if "%~1"=="" (
echo No parameter provided.
echo %HELP_MESSAGE%
echo Possible parameters:
echo.
echo h for home edition
echo p for professionnal edition
echo e for enterprise edition
echo d for education edition
goto :EOF
)
:: Process the provided parameter
set PARAM=%~1
:: Check predefined list of values
if /I "%PARAM%"=="h" (
echo Activating Home edition...
:: Place the specific code for value1 here
set winkey=TX9XD-98N7V-6WMQ6-BX7FG-H8Q99
goto :activation
)
if /I "%PARAM%"=="p" (
echo Activating Pro edition...
:: Place the specific code for value1 here
set winkey=W269N-WFGWX-YVC9B-4J6C9-T83GX
goto :activation
)
if /I "%PARAM%"=="e" (
echo Activating Enterprise edition...
:: Place the specific code for value1 here
set winkey=NPPR9-FWDCX-D2C8J-H872K-2YT43
goto :activation
)
if /I "%PARAM%"=="d" (
echo Activating Education edition...
:: Place the specific code for value1 here
set winkey=NW6C2-QMPVW-D7KKK-3GKT6-VCFB2
goto :activation
)
:: If the parameter is not recognized
echo Invalid parameter: %PARAM%
echo %HELP_MESSAGE%
goto :EOF
:activation
set command=slmgr /ipk %winkey%
for /f "delims=" %%i in ('%command%') do (
echo %%i
)
set command=slmgr /skms kms8.msguides.com
for /f "delims=" %%i in ('%command%') do (
echo %%i
)
set command=slmgr /ato
for /f "delims=" %%i in ('%command%') do (
echo %%i
)
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi,
I've made a batch file that do the activation.
here's the code :
!!!!!!!!!!!!! Start !!!!!!!!!!!!!!!
@echo off
setlocal
:: Define the help message
set HELP_MESSAGE=Usage: activate.bat [parameter]
::echo Possible parameters: h (home), p (professionnal), e (enterprise), d (education)
:: Check if a parameter was provided
if "%~1"=="" (
echo No parameter provided.
echo %HELP_MESSAGE%
echo Possible parameters:
echo.
echo h for home edition
echo p for professionnal edition
echo e for enterprise edition
echo d for education edition
goto :EOF
)
:: Process the provided parameter
set PARAM=%~1
:: Check predefined list of values
if /I "%PARAM%"=="h" (
echo Activating Home edition...
:: Place the specific code for value1 here
set winkey=TX9XD-98N7V-6WMQ6-BX7FG-H8Q99
goto :activation
)
if /I "%PARAM%"=="p" (
echo Activating Pro edition...
:: Place the specific code for value1 here
set winkey=W269N-WFGWX-YVC9B-4J6C9-T83GX
goto :activation
)
if /I "%PARAM%"=="e" (
echo Activating Enterprise edition...
:: Place the specific code for value1 here
set winkey=NPPR9-FWDCX-D2C8J-H872K-2YT43
goto :activation
)
if /I "%PARAM%"=="d" (
echo Activating Education edition...
:: Place the specific code for value1 here
set winkey=NW6C2-QMPVW-D7KKK-3GKT6-VCFB2
goto :activation
)
:: If the parameter is not recognized
echo Invalid parameter: %PARAM%
echo %HELP_MESSAGE%
goto :EOF
:activation
set command=slmgr /ipk %winkey%
for /f "delims=" %%i in ('%command%') do (
echo %%i
)
set command=slmgr /skms kms8.msguides.com
for /f "delims=" %%i in ('%command%') do (
echo %%i
)
set command=slmgr /ato
for /f "delims=" %%i in ('%command%') do (
echo %%i
)
:end
!!!!!!!!!!!!! end !!!!!!!!!!!!!!!
Beta Was this translation helpful? Give feedback.
All reactions