echo Error - Script either has LF line ending issue or an empty line at the end of the script is missing.
echo:
echo:
echoHelp - %mas%troubleshoot
echoCheck this webpage for help - %mas%troubleshoot
echo:
echo:
ping 127.0.0.1 -n 20 >nul
@ -161,19 +163,29 @@ for %%A in (%_act% %_NoEditionChange%) do (if "%%A"=="1" set _unattended=1)
@@ -161,19 +163,29 @@ for %%A in (%_act% %_NoEditionChange%) do (if "%%A"=="1" set _unattended=1)
call:dk_setvar
if%winbuild%EQU 1 (
%eline%
echo Failed to detect Windows build number.
echo:
setlocal EnableDelayedExpansion
setfixes=%fixes%%mas%troubleshoot
call:dk_color2%Blue%"Check this webpage for help - "%_Yellow%"%mas%troubleshoot"
gotodk_done
)
if%winbuild%LSS 10240 (
%eline%
echo Unsupported OS version detected [%winbuild%].
echo HWID Activation is only supported on Windows 10/11.
call:dk_color2%Blue%"Check this webpage for help - "%_Yellow%"%mas%licensing-servers-issue"
)
)
)
@ -722,11 +786,11 @@ call :dk_color %Green% "%winos% is permanently activated with a digital license.
@@ -722,11 +786,11 @@ call :dk_color %Green% "%winos% is permanently activated with a digital license.
%psc%"$job = Start-Job { (Get-WmiObject -Query 'SELECT * FROM %sps%').Version }; if (-not (Wait-Job $job -Timeout 30)) {write-host 'sppsvc is not working correctly. Help - %mas%troubleshoot'}"
%psc%"$job = Start-Job { (Get-WmiObject -Query 'SELECT * FROM %sps%').Version }; if (-not (Wait-Job $job -Timeout 30)) {write-host '%_slser% is not working correctly. Check this webpage for help - %mas%troubleshoot'}"
exit /b
:: Get Product name (WMI/REG methods are not reliable in all conditions, hence winbrand.dll method is used)
@ -1096,19 +1171,19 @@ for %%# in (avira.com kaspersky.com virustotal.com mcafee.com) do (
@@ -1096,19 +1171,19 @@ for %%# in (avira.com kaspersky.com virustotal.com mcafee.com) do (
call:dk_color2%Blue%"Check this webpage for help - "%_Yellow%"%mas%evaluation_editions"
)
)
@ -1305,26 +1380,27 @@ if "%osSKU%"=="164" set osedition=ProfessionalEducation
@@ -1305,26 +1380,27 @@ if "%osSKU%"=="164" set osedition=ProfessionalEducation
:: This "WLMS" service was included in previous Eval editions (which were activable) to automatically shut down the system every hour after the evaluation period expired and prevent SPPSVC from stopping.
ifexist"%SysPath%\wlms\wlms.exe"(
if%winbuild%LSS 9200 (
echo Checking Eval WLMS Service [Found]
) else (
call:dk_color%Red%"Checking Eval WLMS Service [Found]"
)
)
@ -1398,7 +1470,7 @@ call :dk_color2 %Blue% "In case of activation issues, do this - " %_Yellow% " %m
@@ -1398,7 +1470,7 @@ call :dk_color2 %Blue% "In case of activation issues, do this - " %_Yellow% " %m
%psc%"Get-WmiObject -Query 'SELECT Description FROM SoftwareLicensingProduct WHERE PartialProductKey IS NOT NULL AND LicenseDependsOn IS NULL' | Select-Object -Property Description"%nul2%| findstr /i "KMS_"%nul1%||(
for/f"delims="%%a in('%psc% "(Get-ScheduledTask -TaskName 'SvcRestartTask' -TaskPath '\Microsoft\Windows\SoftwareProtectionPlatform\').State"%nul6%') do (set taskinfo=%%a)
call:dk_color2%Blue%"Check this webpage for help - "%_Yellow%"%mas%troubleshoot"
)
gotodk_done
)
@ -431,10 +490,11 @@ echo Server Evaluation cannot be activated. Convert it to full Server OS.
@@ -431,10 +490,11 @@ echo Server Evaluation cannot be activated. Convert it to full Server OS.
echo:
call:dk_color%Blue%"Go Back to main menu and use [Change Edition] option."
) else (
echo Evaluation editions cannot be activated outside of their evaluation period.
echo Evaluation editions cannot be activated outside of their evaluation period.
call:dk_color%Blue%"Use TSforge activation option from the main menu to reset evaluation period."
call:dk_color2%Blue%"Check this webpage for help - "%_Yellow%"%mas%troubleshoot"
gotodk_done
)
)
@ -530,18 +590,18 @@ if exist "%SysPath%\spp\tokens\skus\%osedition%\*GVLK*.xrm-ms" set sppks=1
@@ -530,18 +590,18 @@ if exist "%SysPath%\spp\tokens\skus\%osedition%\*GVLK*.xrm-ms" set sppks=1
ifdefinedskunotfound(
call:dk_color%Red%"Required license files not found in %SysPath%\spp\tokens\skus\"
%psc%"$job = Start-Job { (Get-WmiObject -Query 'SELECT * FROM %sps%').Version }; if (-not (Wait-Job $job -Timeout 30)) {write-host 'sppsvc is not working correctly. Help - %mas%troubleshoot'}"
%psc%"$job = Start-Job { (Get-WmiObject -Query 'SELECT * FROM %sps%').Version }; if (-not (Wait-Job $job -Timeout 30)) {write-host '%_slser% is not working correctly. Check this webpage for help - %mas%troubleshoot'}"
exit /b
:: Get Product name (WMI/REG methods are not reliable in all conditions, hence winbrand.dll method is used)
@ -1248,19 +1314,19 @@ for %%# in (avira.com kaspersky.com virustotal.com mcafee.com) do (
@@ -1248,19 +1314,19 @@ for %%# in (avira.com kaspersky.com virustotal.com mcafee.com) do (
call:dk_color2%Blue%"Check this webpage for help - "%_Yellow%"%mas%evaluation_editions"
)
)
@ -1457,26 +1523,27 @@ if "%osSKU%"=="164" set osedition=ProfessionalEducation
@@ -1457,26 +1523,27 @@ if "%osSKU%"=="164" set osedition=ProfessionalEducation
:: This "WLMS" service was included in previous Eval editions (which were activable) to automatically shut down the system every hour after the evaluation period expired and prevent SPPSVC from stopping.
ifexist"%SysPath%\wlms\wlms.exe"(
if%winbuild%LSS 9200 (
echo Checking Eval WLMS Service [Found]
) else (
call:dk_color%Red%"Checking Eval WLMS Service [Found]"
)
)
@ -1550,7 +1613,7 @@ call :dk_color2 %Blue% "In case of activation issues, do this - " %_Yellow% " %m
@@ -1550,7 +1613,7 @@ call :dk_color2 %Blue% "In case of activation issues, do this - " %_Yellow% " %m
%psc%"Get-WmiObject -Query 'SELECT Description FROM SoftwareLicensingProduct WHERE PartialProductKey IS NOT NULL AND LicenseDependsOn IS NULL' | Select-Object -Property Description"%nul2%| findstr /i "KMS_"%nul1%||(
for/f"delims="%%a in('%psc% "(Get-ScheduledTask -TaskName 'SvcRestartTask' -TaskPath '\Microsoft\Windows\SoftwareProtectionPlatform\').State"%nul6%') do (set taskinfo=%%a)
@ -395,7 +440,7 @@ echo which is not officially supported on your Windows build version %winbuild%.
@@ -395,7 +440,7 @@ echo which is not officially supported on your Windows build version %winbuild%.
call:dk_color2%Blue%"Check this webpage for help - "%_Yellow%"%mas%troubleshoot"
gotodk_done
)
@ -409,7 +454,7 @@ echo Unsupported Office %verchk% is installed on your Windows build version %win
@@ -409,7 +454,7 @@ echo Unsupported Office %verchk% is installed on your Windows build version %win
ifdefinedbypass(echo [!counter!] %%B Unofficial change method will be used)else(echo [!counter!] %%B)
) else (
echo [!counter!] %%B
ifdefinedbypass(echo [!counter!] %%B Unofficial change method will be used)else(echo [!counter!] %%B)
)
settargetFFN!counter!=%%A
settargetchannel!counter!=%%B
ifdefinedbypasssetbypassFFN=!bypassFFN!%%A
)
)
)
@ -1000,7 +1086,7 @@ call :dk_color %_Green% "Enter an option number using your keyboard and press En
@@ -1000,7 +1086,7 @@ call :dk_color %_Green% "Enter an option number using your keyboard and press En
%psc%"$job = Start-Job { (Get-WmiObject -Query 'SELECT * FROM %sps%').Version }; if (-not (Wait-Job $job -Timeout 30)) {write-host 'sppsvc is not working correctly. Help - %mas%troubleshoot'}"
%psc%"$job = Start-Job { (Get-WmiObject -Query 'SELECT * FROM %sps%').Version }; if (-not (Wait-Job $job -Timeout 30)) {write-host '%_slser% is not working correctly. Check this webpage for help - %mas%troubleshoot'}"
exit /b
:: Common lines used in PowerShell reflection code
call:dk_color2%Blue%"Check this webpage for help - "%_Yellow%"%mas%troubleshoot"
gotodk_done
)
@ -584,7 +639,7 @@ call :dk_color %Gray% "Reboot is required to fully change the edition."
@@ -584,7 +639,7 @@ call :dk_color %Gray% "Reboot is required to fully change the edition."
%psc%"$job = Start-Job { (Get-WmiObject -Query 'SELECT * FROM %sps%').Version }; if (-not (Wait-Job $job -Timeout 30)) {write-host 'sppsvc is not working correctly. Help - %mas%troubleshoot'}"
%psc%"$job = Start-Job { (Get-WmiObject -Query 'SELECT * FROM %sps%').Version }; if (-not (Wait-Job $job -Timeout 30)) {write-host '%_slser% is not working correctly. Check this webpage for help - %mas%troubleshoot'}"
exit /b
:: Common lines used in PowerShell reflection code
@ -1202,7 +1286,7 @@ if ($env:permerror -eq 'Error Found In SPP Registries') {
@@ -1202,7 +1286,7 @@ if ($env:permerror -eq 'Error Found In SPP Registries') {
<palign="center">Open-source Windows and Office activator featuring HWID, Ohook, KMS38, and Online KMS activation methods, along with advanced troubleshooting.</p>
<hr>
## Download / How to use it?
### Method 1 - PowerShell (Windows 8 and later) ❤️
1. Open PowerShell (Not CMD). To do that, right-click on the Windows start menu and select PowerShell or Terminal.
2. Copy and paste the code below and press enter
```
irm https://get.activated.win | iex
```
3. You will see the activation options. Choose (1) HWID for Windows activation. Choose (2) Ohook for Office activation.
4. That's all.
<details>
<summary>More options</summary>
- Alternatively, you can use the following (It will be deprecated in the future.)
```
irm https://massgrave.dev/get | iex
```
- The URL `get.activated.win` might be blocked by some DNS services because it is a new domain.
</details>
---
### Method 2 - Traditional (Windows 7 and later)
<details>
<summary>Click here for info</summary>
1. Download the file using the links provided below.
<palign="center">Open-source Windows and Office activator featuring HWID, Ohook, TSforge, KMS38, and Online KMS activation methods, along with advanced troubleshooting.</p>
<hr>
## How to Activate Windows / Office?
### Method 1 - PowerShell (Windows 8 and later) ❤️
1. **Open PowerShell**
To do that, press the Windows key + X, then select PowerShell or Terminal.
2. **Copy and paste the code below, then press enter.**
```
irm https://get.activated.win | iex
```
Alternatively, you can use the following (this will be deprecated in the future):
```
irm https://massgrave.dev/get | iex
```
3. You will see the activation options. Choose the activation options highlighted in green.
4. That's all
---
### Method 2 - Traditional (Windows Vista and later)
<details>
<summary>Click here to view</summary>
1. Download the file using one of the links below:
2. Right-click on the downloaded zip file and extract it.
3. In the extracted folder, find the folder named `All-In-One-Version`.
4. Run the file named `MAS_AIO.cmd`.
5. You will see the activation options. Follow the on-screen instructions.
6. That's all.
</details>
---
- To activate additional products such as **Office for macOS, Visual Studio, RDS CALs, and Windows XP**, check [here](https://massgrave.dev/unsupported_products_activation).
- To run the scripts in unattended mode, check [here](https://massgrave.dev/command_line_switches).
---
### Not working ❓
- If you are **unable to launch MAS** using the PowerShell method, please refer to **Method 2** listed above.
- If MAS is launched and the script shows any errors, check for any troubleshooting steps mentioned in blue color and try to follow those.
- If you have any issues, please feel free to reach out to us [here](https://massgrave.dev/troubleshoot).
---
> [!NOTE]
>
> - The IRM command in PowerShell downloads a script from a specified URL, and the IEX command executes it.
> - Always double-check the URL before executing the command and verify the source if manually downloading files.
> - Be cautious, as some spread malware disguised as MAS by using different URLs in the IRM command.