Browse Source

Fix bugs due to x86 Powershell (No ARM64/x64) on Windows 10 ARM64

master
WindowsAddict 2 months ago
parent
commit
7c69c471c5
  1. 23
      MAS/All-In-One-Version-KL/MAS_AIO.cmd
  2. 19
      MAS/Separate-Files-Version/Activators/HWID_Activation.cmd
  3. 19
      MAS/Separate-Files-Version/Activators/KMS38_Activation.cmd
  4. 19
      MAS/Separate-Files-Version/Activators/Ohook_Activation_AIO.cmd
  5. 19
      MAS/Separate-Files-Version/Activators/Online_KMS_Activation.cmd
  6. 17
      MAS/Separate-Files-Version/Change_Office_Edition.cmd
  7. 17
      MAS/Separate-Files-Version/Change_Windows_Edition.cmd
  8. 17
      MAS/Separate-Files-Version/Extract_OEM_Folder.cmd
  9. 19
      MAS/Separate-Files-Version/Troubleshoot.cmd

23
MAS/All-In-One-Version-KL/MAS_AIO.cmd

@ -40,24 +40,24 @@ set "PSModulePath=%ProgramFiles%\WindowsPowerShell\Modules;%SysPath%\WindowsPowe
set "_cmdf=%~f0" set "_cmdf=%~f0"
for %%# in (%*) do ( for %%# in (%*) do (
if /i "%%#"=="r1" set r1=1 if /i "%%#"=="re1" (set re1=1) else (set re1=)
if /i "%%#"=="r2" set r2=1 if /i "%%#"=="re2" (set re2=1) else (set re2=)
) )
:: Re-launch the script with x64 process if it was initiated by x86 process on x64 bit Windows :: Re-launch the script with x64 process if it was initiated by x86 process on x64 bit Windows
:: or with ARM64 process if it was initiated by x86/ARM32 process on ARM64 Windows :: or with ARM64 process if it was initiated by x86/ARM32 process on ARM64 Windows
if exist %SystemRoot%\Sysnative\cmd.exe if not defined r1 ( if exist %SystemRoot%\Sysnative\cmd.exe if not defined re1 (
setlocal EnableDelayedExpansion setlocal EnableDelayedExpansion
start %SystemRoot%\Sysnative\cmd.exe /c ""!_cmdf!" %* r1" start %SystemRoot%\Sysnative\cmd.exe /c ""!_cmdf!" %* re1"
exit /b exit /b
) )
:: Re-launch the script with ARM32 process if it was initiated by x64 process on ARM64 Windows :: Re-launch the script with ARM32 process if it was initiated by x64 process on ARM64 Windows
if exist %SystemRoot%\SysArm32\cmd.exe if %PROCESSOR_ARCHITECTURE%==AMD64 if not defined r2 ( if exist %SystemRoot%\SysArm32\cmd.exe if %PROCESSOR_ARCHITECTURE%==AMD64 if not defined re2 (
setlocal EnableDelayedExpansion setlocal EnableDelayedExpansion
start %SystemRoot%\SysArm32\cmd.exe /c ""!_cmdf!" %* r2" start %SystemRoot%\SysArm32\cmd.exe /c ""!_cmdf!" %* re2"
exit /b exit /b
) )
@ -110,6 +110,8 @@ set _unattended=0
set _args=%* set _args=%*
if defined _args set _args=%_args:"=% if defined _args set _args=%_args:"=%
if defined _args set _args=%_args:re1=%
if defined _args set _args=%_args:re2=%
if defined _args ( if defined _args (
for %%A in (%_args%) do ( for %%A in (%_args%) do (
if /i "%%A"=="-el" set _elev=1 if /i "%%A"=="-el" set _elev=1
@ -224,6 +226,7 @@ if defined terminal (
%psc% "%d2%" %nul2% | find /i "True" %nul1% && set terminal= %psc% "%d2%" %nul2% | find /i "True" %nul1% && set terminal=
) )
if defined ps32onArm goto :skipQE
if %_unattended%==1 goto :skipQE if %_unattended%==1 goto :skipQE
for %%# in (%_args%) do (if /i "%%#"=="-qedit" goto :skipQE) for %%# in (%_args%) do (if /i "%%#"=="-qedit" goto :skipQE)
@ -986,6 +989,8 @@ set _NCS=1
if %winbuild% LSS 10586 set _NCS=0 if %winbuild% LSS 10586 set _NCS=0
if %winbuild% GEQ 10586 reg query "HKCU\Console" /v ForceV2 %nul2% | find /i "0x0" %nul1% && (set _NCS=0) if %winbuild% GEQ 10586 reg query "HKCU\Console" /v ForceV2 %nul2% | find /i "0x0" %nul1% && (set _NCS=0)
echo "%PROCESSOR_ARCHITECTURE% %PROCESSOR_ARCHITEW6432%" | find /i "ARM64" %nul1% && (if %winbuild% LSS 21277 set ps32onArm=1)
if %_NCS% EQU 1 ( if %_NCS% EQU 1 (
for /F %%a in ('echo prompt $E ^| cmd') do set "esc=%%a" for /F %%a in ('echo prompt $E ^| cmd') do set "esc=%%a"
set "Red="41;97m"" set "Red="41;97m""
@ -1689,7 +1694,7 @@ call :dk_color %Red% "Checking SvcRestartTask Status [!taskinfo!, Syste
:: This code checks if SPP has permission access to tokens folder and required registry keys. It's often caused by gaming spoofers. :: This code checks if SPP has permission access to tokens folder and required registry keys. It's often caused by gaming spoofers.
set permerror= set permerror=
if %winbuild% GEQ 9200 ( if %winbuild% GEQ 9200 if not defined ps32onArm (
for %%# in ( for %%# in (
"%tokenstore%+FullControl" "%tokenstore%+FullControl"
"HKLM:\SYSTEM\WPA+QueryValues, EnumerateSubKeys, WriteKey" "HKLM:\SYSTEM\WPA+QueryValues, EnumerateSubKeys, WriteKey"
@ -4782,6 +4787,8 @@ call :ks_process
::======================================================================================================================================== ::========================================================================================================================================
:ks_starto15c2r
:: Process Office 15.0 C2R :: Process Office 15.0 C2R
if not defined o15c2r goto :ks_starto16c2r if not defined o15c2r goto :ks_starto16c2r
@ -8317,6 +8324,8 @@ exit /b
set permerror= set permerror=
if not exist "%tokenstore%\" set "permerror=Error Found In Token Folder" if not exist "%tokenstore%\" set "permerror=Error Found In Token Folder"
if defined ps32onArm exit /b
for %%# in ( for %%# in (
"%tokenstore%+FullControl" "%tokenstore%+FullControl"
"HKLM:\SYSTEM\WPA+QueryValues, EnumerateSubKeys, WriteKey" "HKLM:\SYSTEM\WPA+QueryValues, EnumerateSubKeys, WriteKey"

19
MAS/Separate-Files-Version/Activators/HWID_Activation.cmd

@ -46,24 +46,24 @@ set "PSModulePath=%ProgramFiles%\WindowsPowerShell\Modules;%SysPath%\WindowsPowe
set "_cmdf=%~f0" set "_cmdf=%~f0"
for %%# in (%*) do ( for %%# in (%*) do (
if /i "%%#"=="r1" set r1=1 if /i "%%#"=="re1" (set re1=1) else (set re1=)
if /i "%%#"=="r2" set r2=1 if /i "%%#"=="re2" (set re2=1) else (set re2=)
) )
:: Re-launch the script with x64 process if it was initiated by x86 process on x64 bit Windows :: Re-launch the script with x64 process if it was initiated by x86 process on x64 bit Windows
:: or with ARM64 process if it was initiated by x86/ARM32 process on ARM64 Windows :: or with ARM64 process if it was initiated by x86/ARM32 process on ARM64 Windows
if exist %SystemRoot%\Sysnative\cmd.exe if not defined r1 ( if exist %SystemRoot%\Sysnative\cmd.exe if not defined re1 (
setlocal EnableDelayedExpansion setlocal EnableDelayedExpansion
start %SystemRoot%\Sysnative\cmd.exe /c ""!_cmdf!" %* r1" start %SystemRoot%\Sysnative\cmd.exe /c ""!_cmdf!" %* re1"
exit /b exit /b
) )
:: Re-launch the script with ARM32 process if it was initiated by x64 process on ARM64 Windows :: Re-launch the script with ARM32 process if it was initiated by x64 process on ARM64 Windows
if exist %SystemRoot%\SysArm32\cmd.exe if %PROCESSOR_ARCHITECTURE%==AMD64 if not defined r2 ( if exist %SystemRoot%\SysArm32\cmd.exe if %PROCESSOR_ARCHITECTURE%==AMD64 if not defined re2 (
setlocal EnableDelayedExpansion setlocal EnableDelayedExpansion
start %SystemRoot%\SysArm32\cmd.exe /c ""!_cmdf!" %* r2" start %SystemRoot%\SysArm32\cmd.exe /c ""!_cmdf!" %* re2"
exit /b exit /b
) )
@ -143,6 +143,8 @@ set _unattended=0
set _args=%* set _args=%*
if defined _args set _args=%_args:"=% if defined _args set _args=%_args:"=%
if defined _args set _args=%_args:re1=%
if defined _args set _args=%_args:re2=%
if defined _args ( if defined _args (
for %%A in (%_args%) do ( for %%A in (%_args%) do (
if /i "%%A"=="/HWID" set _act=1 if /i "%%A"=="/HWID" set _act=1
@ -263,6 +265,7 @@ if defined terminal (
%psc% "%d2%" %nul2% | find /i "True" %nul1% && set terminal= %psc% "%d2%" %nul2% | find /i "True" %nul1% && set terminal=
) )
if defined ps32onArm goto :skipQE
if %_unattended%==1 goto :skipQE if %_unattended%==1 goto :skipQE
for %%# in (%_args%) do (if /i "%%#"=="-qedit" goto :skipQE) for %%# in (%_args%) do (if /i "%%#"=="-qedit" goto :skipQE)
@ -749,6 +752,8 @@ set _NCS=1
if %winbuild% LSS 10586 set _NCS=0 if %winbuild% LSS 10586 set _NCS=0
if %winbuild% GEQ 10586 reg query "HKCU\Console" /v ForceV2 %nul2% | find /i "0x0" %nul1% && (set _NCS=0) if %winbuild% GEQ 10586 reg query "HKCU\Console" /v ForceV2 %nul2% | find /i "0x0" %nul1% && (set _NCS=0)
echo "%PROCESSOR_ARCHITECTURE% %PROCESSOR_ARCHITEW6432%" | find /i "ARM64" %nul1% && (if %winbuild% LSS 21277 set ps32onArm=1)
if %_NCS% EQU 1 ( if %_NCS% EQU 1 (
for /F %%a in ('echo prompt $E ^| cmd') do set "esc=%%a" for /F %%a in ('echo prompt $E ^| cmd') do set "esc=%%a"
set "Red="41;97m"" set "Red="41;97m""
@ -1452,7 +1457,7 @@ call :dk_color %Red% "Checking SvcRestartTask Status [!taskinfo!, Syste
:: This code checks if SPP has permission access to tokens folder and required registry keys. It's often caused by gaming spoofers. :: This code checks if SPP has permission access to tokens folder and required registry keys. It's often caused by gaming spoofers.
set permerror= set permerror=
if %winbuild% GEQ 9200 ( if %winbuild% GEQ 9200 if not defined ps32onArm (
for %%# in ( for %%# in (
"%tokenstore%+FullControl" "%tokenstore%+FullControl"
"HKLM:\SYSTEM\WPA+QueryValues, EnumerateSubKeys, WriteKey" "HKLM:\SYSTEM\WPA+QueryValues, EnumerateSubKeys, WriteKey"

19
MAS/Separate-Files-Version/Activators/KMS38_Activation.cmd

@ -49,24 +49,24 @@ set "PSModulePath=%ProgramFiles%\WindowsPowerShell\Modules;%SysPath%\WindowsPowe
set "_cmdf=%~f0" set "_cmdf=%~f0"
for %%# in (%*) do ( for %%# in (%*) do (
if /i "%%#"=="r1" set r1=1 if /i "%%#"=="re1" (set re1=1) else (set re1=)
if /i "%%#"=="r2" set r2=1 if /i "%%#"=="re2" (set re2=1) else (set re2=)
) )
:: Re-launch the script with x64 process if it was initiated by x86 process on x64 bit Windows :: Re-launch the script with x64 process if it was initiated by x86 process on x64 bit Windows
:: or with ARM64 process if it was initiated by x86/ARM32 process on ARM64 Windows :: or with ARM64 process if it was initiated by x86/ARM32 process on ARM64 Windows
if exist %SystemRoot%\Sysnative\cmd.exe if not defined r1 ( if exist %SystemRoot%\Sysnative\cmd.exe if not defined re1 (
setlocal EnableDelayedExpansion setlocal EnableDelayedExpansion
start %SystemRoot%\Sysnative\cmd.exe /c ""!_cmdf!" %* r1" start %SystemRoot%\Sysnative\cmd.exe /c ""!_cmdf!" %* re1"
exit /b exit /b
) )
:: Re-launch the script with ARM32 process if it was initiated by x64 process on ARM64 Windows :: Re-launch the script with ARM32 process if it was initiated by x64 process on ARM64 Windows
if exist %SystemRoot%\SysArm32\cmd.exe if %PROCESSOR_ARCHITECTURE%==AMD64 if not defined r2 ( if exist %SystemRoot%\SysArm32\cmd.exe if %PROCESSOR_ARCHITECTURE%==AMD64 if not defined re2 (
setlocal EnableDelayedExpansion setlocal EnableDelayedExpansion
start %SystemRoot%\SysArm32\cmd.exe /c ""!_cmdf!" %* r2" start %SystemRoot%\SysArm32\cmd.exe /c ""!_cmdf!" %* re2"
exit /b exit /b
) )
@ -146,6 +146,8 @@ set _unattended=0
set _args=%* set _args=%*
if defined _args set _args=%_args:"=% if defined _args set _args=%_args:"=%
if defined _args set _args=%_args:re1=%
if defined _args set _args=%_args:re2=%
if defined _args ( if defined _args (
for %%A in (%_args%) do ( for %%A in (%_args%) do (
if /i "%%A"=="/KMS38" set _act=1 if /i "%%A"=="/KMS38" set _act=1
@ -266,6 +268,7 @@ if defined terminal (
%psc% "%d2%" %nul2% | find /i "True" %nul1% && set terminal= %psc% "%d2%" %nul2% | find /i "True" %nul1% && set terminal=
) )
if defined ps32onArm goto :skipQE
if %_unattended%==1 goto :skipQE if %_unattended%==1 goto :skipQE
for %%# in (%_args%) do (if /i "%%#"=="-qedit" goto :skipQE) for %%# in (%_args%) do (if /i "%%#"=="-qedit" goto :skipQE)
@ -860,6 +863,8 @@ set _NCS=1
if %winbuild% LSS 10586 set _NCS=0 if %winbuild% LSS 10586 set _NCS=0
if %winbuild% GEQ 10586 reg query "HKCU\Console" /v ForceV2 %nul2% | find /i "0x0" %nul1% && (set _NCS=0) if %winbuild% GEQ 10586 reg query "HKCU\Console" /v ForceV2 %nul2% | find /i "0x0" %nul1% && (set _NCS=0)
echo "%PROCESSOR_ARCHITECTURE% %PROCESSOR_ARCHITEW6432%" | find /i "ARM64" %nul1% && (if %winbuild% LSS 21277 set ps32onArm=1)
if %_NCS% EQU 1 ( if %_NCS% EQU 1 (
for /F %%a in ('echo prompt $E ^| cmd') do set "esc=%%a" for /F %%a in ('echo prompt $E ^| cmd') do set "esc=%%a"
set "Red="41;97m"" set "Red="41;97m""
@ -1606,7 +1611,7 @@ call :dk_color %Red% "Checking SvcRestartTask Status [!taskinfo!, Syste
:: This code checks if SPP has permission access to tokens folder and required registry keys. It's often caused by gaming spoofers. :: This code checks if SPP has permission access to tokens folder and required registry keys. It's often caused by gaming spoofers.
set permerror= set permerror=
if %winbuild% GEQ 9200 ( if %winbuild% GEQ 9200 if not defined ps32onArm (
for %%# in ( for %%# in (
"%tokenstore%+FullControl" "%tokenstore%+FullControl"
"HKLM:\SYSTEM\WPA+QueryValues, EnumerateSubKeys, WriteKey" "HKLM:\SYSTEM\WPA+QueryValues, EnumerateSubKeys, WriteKey"

19
MAS/Separate-Files-Version/Activators/Ohook_Activation_AIO.cmd

@ -46,24 +46,24 @@ set "PSModulePath=%ProgramFiles%\WindowsPowerShell\Modules;%SysPath%\WindowsPowe
set "_cmdf=%~f0" set "_cmdf=%~f0"
for %%# in (%*) do ( for %%# in (%*) do (
if /i "%%#"=="r1" set r1=1 if /i "%%#"=="re1" (set re1=1) else (set re1=)
if /i "%%#"=="r2" set r2=1 if /i "%%#"=="re2" (set re2=1) else (set re2=)
) )
:: Re-launch the script with x64 process if it was initiated by x86 process on x64 bit Windows :: Re-launch the script with x64 process if it was initiated by x86 process on x64 bit Windows
:: or with ARM64 process if it was initiated by x86/ARM32 process on ARM64 Windows :: or with ARM64 process if it was initiated by x86/ARM32 process on ARM64 Windows
if exist %SystemRoot%\Sysnative\cmd.exe if not defined r1 ( if exist %SystemRoot%\Sysnative\cmd.exe if not defined re1 (
setlocal EnableDelayedExpansion setlocal EnableDelayedExpansion
start %SystemRoot%\Sysnative\cmd.exe /c ""!_cmdf!" %* r1" start %SystemRoot%\Sysnative\cmd.exe /c ""!_cmdf!" %* re1"
exit /b exit /b
) )
:: Re-launch the script with ARM32 process if it was initiated by x64 process on ARM64 Windows :: Re-launch the script with ARM32 process if it was initiated by x64 process on ARM64 Windows
if exist %SystemRoot%\SysArm32\cmd.exe if %PROCESSOR_ARCHITECTURE%==AMD64 if not defined r2 ( if exist %SystemRoot%\SysArm32\cmd.exe if %PROCESSOR_ARCHITECTURE%==AMD64 if not defined re2 (
setlocal EnableDelayedExpansion setlocal EnableDelayedExpansion
start %SystemRoot%\SysArm32\cmd.exe /c ""!_cmdf!" %* r2" start %SystemRoot%\SysArm32\cmd.exe /c ""!_cmdf!" %* re2"
exit /b exit /b
) )
@ -143,6 +143,8 @@ set _unattended=0
set _args=%* set _args=%*
if defined _args set _args=%_args:"=% if defined _args set _args=%_args:"=%
if defined _args set _args=%_args:re1=%
if defined _args set _args=%_args:re2=%
if defined _args ( if defined _args (
for %%A in (%_args%) do ( for %%A in (%_args%) do (
if /i "%%A"=="/Ohook" set _act=1 if /i "%%A"=="/Ohook" set _act=1
@ -256,6 +258,7 @@ if defined terminal (
%psc% "%d2%" %nul2% | find /i "True" %nul1% && set terminal= %psc% "%d2%" %nul2% | find /i "True" %nul1% && set terminal=
) )
if defined ps32onArm goto :skipQE
if %_unattended%==1 goto :skipQE if %_unattended%==1 goto :skipQE
for %%# in (%_args%) do (if /i "%%#"=="-qedit" goto :skipQE) for %%# in (%_args%) do (if /i "%%#"=="-qedit" goto :skipQE)
@ -1354,6 +1357,8 @@ set _NCS=1
if %winbuild% LSS 10586 set _NCS=0 if %winbuild% LSS 10586 set _NCS=0
if %winbuild% GEQ 10586 reg query "HKCU\Console" /v ForceV2 %nul2% | find /i "0x0" %nul1% && (set _NCS=0) if %winbuild% GEQ 10586 reg query "HKCU\Console" /v ForceV2 %nul2% | find /i "0x0" %nul1% && (set _NCS=0)
echo "%PROCESSOR_ARCHITECTURE% %PROCESSOR_ARCHITEW6432%" | find /i "ARM64" %nul1% && (if %winbuild% LSS 21277 set ps32onArm=1)
if %_NCS% EQU 1 ( if %_NCS% EQU 1 (
for /F %%a in ('echo prompt $E ^| cmd') do set "esc=%%a" for /F %%a in ('echo prompt $E ^| cmd') do set "esc=%%a"
set "Red="41;97m"" set "Red="41;97m""
@ -1932,7 +1937,7 @@ call :dk_color %Red% "Checking SvcRestartTask Status [!taskinfo!, Syste
:: This code checks if SPP has permission access to tokens folder and required registry keys. It's often caused by gaming spoofers. :: This code checks if SPP has permission access to tokens folder and required registry keys. It's often caused by gaming spoofers.
set permerror= set permerror=
if %winbuild% GEQ 9200 ( if %winbuild% GEQ 9200 if not defined ps32onArm (
for %%# in ( for %%# in (
"%tokenstore%+FullControl" "%tokenstore%+FullControl"
"HKLM:\SYSTEM\WPA+QueryValues, EnumerateSubKeys, WriteKey" "HKLM:\SYSTEM\WPA+QueryValues, EnumerateSubKeys, WriteKey"

19
MAS/Separate-Files-Version/Activators/Online_KMS_Activation.cmd

@ -71,24 +71,24 @@ set "PSModulePath=%ProgramFiles%\WindowsPowerShell\Modules;%SysPath%\WindowsPowe
set "_cmdf=%~f0" set "_cmdf=%~f0"
for %%# in (%*) do ( for %%# in (%*) do (
if /i "%%#"=="r1" set r1=1 if /i "%%#"=="re1" (set re1=1) else (set re1=)
if /i "%%#"=="r2" set r2=1 if /i "%%#"=="re2" (set re2=1) else (set re2=)
) )
:: Re-launch the script with x64 process if it was initiated by x86 process on x64 bit Windows :: Re-launch the script with x64 process if it was initiated by x86 process on x64 bit Windows
:: or with ARM64 process if it was initiated by x86/ARM32 process on ARM64 Windows :: or with ARM64 process if it was initiated by x86/ARM32 process on ARM64 Windows
if exist %SystemRoot%\Sysnative\cmd.exe if not defined r1 ( if exist %SystemRoot%\Sysnative\cmd.exe if not defined re1 (
setlocal EnableDelayedExpansion setlocal EnableDelayedExpansion
start %SystemRoot%\Sysnative\cmd.exe /c ""!_cmdf!" %* r1" start %SystemRoot%\Sysnative\cmd.exe /c ""!_cmdf!" %* re1"
exit /b exit /b
) )
:: Re-launch the script with ARM32 process if it was initiated by x64 process on ARM64 Windows :: Re-launch the script with ARM32 process if it was initiated by x64 process on ARM64 Windows
if exist %SystemRoot%\SysArm32\cmd.exe if %PROCESSOR_ARCHITECTURE%==AMD64 if not defined r2 ( if exist %SystemRoot%\SysArm32\cmd.exe if %PROCESSOR_ARCHITECTURE%==AMD64 if not defined re2 (
setlocal EnableDelayedExpansion setlocal EnableDelayedExpansion
start %SystemRoot%\SysArm32\cmd.exe /c ""!_cmdf!" %* r2" start %SystemRoot%\SysArm32\cmd.exe /c ""!_cmdf!" %* re2"
exit /b exit /b
) )
@ -169,6 +169,8 @@ set _unattended=0
set _args=%* set _args=%*
if defined _args set _args=%_args:"=% if defined _args set _args=%_args:"=%
if defined _args set _args=%_args:re1=%
if defined _args set _args=%_args:re2=%
if defined _args for %%A in (%_args%) do ( if defined _args for %%A in (%_args%) do (
if /i "%%A"=="-el" (set _elev=1) if /i "%%A"=="-el" (set _elev=1)
if /i "%%A"=="/K-Windows" (set _actwin=1) if /i "%%A"=="/K-Windows" (set _actwin=1)
@ -285,6 +287,7 @@ if defined terminal (
%psc% "%d2%" %nul2% | find /i "True" %nul1% && set terminal= %psc% "%d2%" %nul2% | find /i "True" %nul1% && set terminal=
) )
if defined ps32onArm goto :skipQE
if %_unattended%==1 goto :skipQE if %_unattended%==1 goto :skipQE
for %%# in (%_args%) do (if /i "%%#"=="-qedit" goto :skipQE) for %%# in (%_args%) do (if /i "%%#"=="-qedit" goto :skipQE)
@ -2291,6 +2294,8 @@ set _NCS=1
if %winbuild% LSS 10586 set _NCS=0 if %winbuild% LSS 10586 set _NCS=0
if %winbuild% GEQ 10586 reg query "HKCU\Console" /v ForceV2 %nul2% | find /i "0x0" %nul1% && (set _NCS=0) if %winbuild% GEQ 10586 reg query "HKCU\Console" /v ForceV2 %nul2% | find /i "0x0" %nul1% && (set _NCS=0)
echo "%PROCESSOR_ARCHITECTURE% %PROCESSOR_ARCHITEW6432%" | find /i "ARM64" %nul1% && (if %winbuild% LSS 21277 set ps32onArm=1)
if %_NCS% EQU 1 ( if %_NCS% EQU 1 (
for /F %%a in ('echo prompt $E ^| cmd') do set "esc=%%a" for /F %%a in ('echo prompt $E ^| cmd') do set "esc=%%a"
set "Red="41;97m"" set "Red="41;97m""
@ -3018,7 +3023,7 @@ call :dk_color %Red% "Checking SvcRestartTask Status [!taskinfo!, Syste
:: This code checks if SPP has permission access to tokens folder and required registry keys. It's often caused by gaming spoofers. :: This code checks if SPP has permission access to tokens folder and required registry keys. It's often caused by gaming spoofers.
set permerror= set permerror=
if %winbuild% GEQ 9200 ( if %winbuild% GEQ 9200 if not defined ps32onArm (
for %%# in ( for %%# in (
"%tokenstore%+FullControl" "%tokenstore%+FullControl"
"HKLM:\SYSTEM\WPA+QueryValues, EnumerateSubKeys, WriteKey" "HKLM:\SYSTEM\WPA+QueryValues, EnumerateSubKeys, WriteKey"

17
MAS/Separate-Files-Version/Change_Office_Edition.cmd

@ -33,24 +33,24 @@ set "PSModulePath=%ProgramFiles%\WindowsPowerShell\Modules;%SysPath%\WindowsPowe
set "_cmdf=%~f0" set "_cmdf=%~f0"
for %%# in (%*) do ( for %%# in (%*) do (
if /i "%%#"=="r1" set r1=1 if /i "%%#"=="re1" (set re1=1) else (set re1=)
if /i "%%#"=="r2" set r2=1 if /i "%%#"=="re2" (set re2=1) else (set re2=)
) )
:: Re-launch the script with x64 process if it was initiated by x86 process on x64 bit Windows :: Re-launch the script with x64 process if it was initiated by x86 process on x64 bit Windows
:: or with ARM64 process if it was initiated by x86/ARM32 process on ARM64 Windows :: or with ARM64 process if it was initiated by x86/ARM32 process on ARM64 Windows
if exist %SystemRoot%\Sysnative\cmd.exe if not defined r1 ( if exist %SystemRoot%\Sysnative\cmd.exe if not defined re1 (
setlocal EnableDelayedExpansion setlocal EnableDelayedExpansion
start %SystemRoot%\Sysnative\cmd.exe /c ""!_cmdf!" %* r1" start %SystemRoot%\Sysnative\cmd.exe /c ""!_cmdf!" %* re1"
exit /b exit /b
) )
:: Re-launch the script with ARM32 process if it was initiated by x64 process on ARM64 Windows :: Re-launch the script with ARM32 process if it was initiated by x64 process on ARM64 Windows
if exist %SystemRoot%\SysArm32\cmd.exe if %PROCESSOR_ARCHITECTURE%==AMD64 if not defined r2 ( if exist %SystemRoot%\SysArm32\cmd.exe if %PROCESSOR_ARCHITECTURE%==AMD64 if not defined re2 (
setlocal EnableDelayedExpansion setlocal EnableDelayedExpansion
start %SystemRoot%\SysArm32\cmd.exe /c ""!_cmdf!" %* r2" start %SystemRoot%\SysArm32\cmd.exe /c ""!_cmdf!" %* re2"
exit /b exit /b
) )
@ -103,6 +103,8 @@ set _unattended=0
set _args=%* set _args=%*
if defined _args set _args=%_args:"=% if defined _args set _args=%_args:"=%
if defined _args set _args=%_args:re1=%
if defined _args set _args=%_args:re2=%
if defined _args ( if defined _args (
for %%A in (%_args%) do ( for %%A in (%_args%) do (
if /i "%%A"=="-el" set _elev=1 if /i "%%A"=="-el" set _elev=1
@ -216,6 +218,7 @@ if defined terminal (
%psc% "%d2%" %nul2% | find /i "True" %nul1% && set terminal= %psc% "%d2%" %nul2% | find /i "True" %nul1% && set terminal=
) )
if defined ps32onArm goto :skipQE
if %_unattended%==1 goto :skipQE if %_unattended%==1 goto :skipQE
for %%# in (%_args%) do (if /i "%%#"=="-qedit" goto :skipQE) for %%# in (%_args%) do (if /i "%%#"=="-qedit" goto :skipQE)
@ -1299,6 +1302,8 @@ set _NCS=1
if %winbuild% LSS 10586 set _NCS=0 if %winbuild% LSS 10586 set _NCS=0
if %winbuild% GEQ 10586 reg query "HKCU\Console" /v ForceV2 %nul2% | find /i "0x0" %nul1% && (set _NCS=0) if %winbuild% GEQ 10586 reg query "HKCU\Console" /v ForceV2 %nul2% | find /i "0x0" %nul1% && (set _NCS=0)
echo "%PROCESSOR_ARCHITECTURE% %PROCESSOR_ARCHITEW6432%" | find /i "ARM64" %nul1% && (if %winbuild% LSS 21277 set ps32onArm=1)
if %_NCS% EQU 1 ( if %_NCS% EQU 1 (
for /F %%a in ('echo prompt $E ^| cmd') do set "esc=%%a" for /F %%a in ('echo prompt $E ^| cmd') do set "esc=%%a"
set "Red="41;97m"" set "Red="41;97m""

17
MAS/Separate-Files-Version/Change_Windows_Edition.cmd

@ -38,24 +38,24 @@ set "PSModulePath=%ProgramFiles%\WindowsPowerShell\Modules;%SysPath%\WindowsPowe
set "_cmdf=%~f0" set "_cmdf=%~f0"
for %%# in (%*) do ( for %%# in (%*) do (
if /i "%%#"=="r1" set r1=1 if /i "%%#"=="re1" (set re1=1) else (set re1=)
if /i "%%#"=="r2" set r2=1 if /i "%%#"=="re2" (set re2=1) else (set re2=)
) )
:: Re-launch the script with x64 process if it was initiated by x86 process on x64 bit Windows :: Re-launch the script with x64 process if it was initiated by x86 process on x64 bit Windows
:: or with ARM64 process if it was initiated by x86/ARM32 process on ARM64 Windows :: or with ARM64 process if it was initiated by x86/ARM32 process on ARM64 Windows
if exist %SystemRoot%\Sysnative\cmd.exe if not defined r1 ( if exist %SystemRoot%\Sysnative\cmd.exe if not defined re1 (
setlocal EnableDelayedExpansion setlocal EnableDelayedExpansion
start %SystemRoot%\Sysnative\cmd.exe /c ""!_cmdf!" %* r1" start %SystemRoot%\Sysnative\cmd.exe /c ""!_cmdf!" %* re1"
exit /b exit /b
) )
:: Re-launch the script with ARM32 process if it was initiated by x64 process on ARM64 Windows :: Re-launch the script with ARM32 process if it was initiated by x64 process on ARM64 Windows
if exist %SystemRoot%\SysArm32\cmd.exe if %PROCESSOR_ARCHITECTURE%==AMD64 if not defined r2 ( if exist %SystemRoot%\SysArm32\cmd.exe if %PROCESSOR_ARCHITECTURE%==AMD64 if not defined re2 (
setlocal EnableDelayedExpansion setlocal EnableDelayedExpansion
start %SystemRoot%\SysArm32\cmd.exe /c ""!_cmdf!" %* r2" start %SystemRoot%\SysArm32\cmd.exe /c ""!_cmdf!" %* re2"
exit /b exit /b
) )
@ -108,6 +108,8 @@ set _unattended=0
set _args=%* set _args=%*
if defined _args set _args=%_args:"=% if defined _args set _args=%_args:"=%
if defined _args set _args=%_args:re1=%
if defined _args set _args=%_args:re2=%
if defined _args ( if defined _args (
for %%A in (%_args%) do ( for %%A in (%_args%) do (
if /i "%%A"=="-el" set _elev=1 if /i "%%A"=="-el" set _elev=1
@ -221,6 +223,7 @@ if defined terminal (
%psc% "%d2%" %nul2% | find /i "True" %nul1% && set terminal= %psc% "%d2%" %nul2% | find /i "True" %nul1% && set terminal=
) )
if defined ps32onArm goto :skipQE
if %_unattended%==1 goto :skipQE if %_unattended%==1 goto :skipQE
for %%# in (%_args%) do (if /i "%%#"=="-qedit" goto :skipQE) for %%# in (%_args%) do (if /i "%%#"=="-qedit" goto :skipQE)
@ -783,6 +786,8 @@ set _NCS=1
if %winbuild% LSS 10586 set _NCS=0 if %winbuild% LSS 10586 set _NCS=0
if %winbuild% GEQ 10586 reg query "HKCU\Console" /v ForceV2 %nul2% | find /i "0x0" %nul1% && (set _NCS=0) if %winbuild% GEQ 10586 reg query "HKCU\Console" /v ForceV2 %nul2% | find /i "0x0" %nul1% && (set _NCS=0)
echo "%PROCESSOR_ARCHITECTURE% %PROCESSOR_ARCHITEW6432%" | find /i "ARM64" %nul1% && (if %winbuild% LSS 21277 set ps32onArm=1)
if %_NCS% EQU 1 ( if %_NCS% EQU 1 (
for /F %%a in ('echo prompt $E ^| cmd') do set "esc=%%a" for /F %%a in ('echo prompt $E ^| cmd') do set "esc=%%a"
set "Red="41;97m"" set "Red="41;97m""

17
MAS/Separate-Files-Version/Extract_OEM_Folder.cmd

@ -33,24 +33,24 @@ set "PSModulePath=%ProgramFiles%\WindowsPowerShell\Modules;%SysPath%\WindowsPowe
set "_cmdf=%~f0" set "_cmdf=%~f0"
for %%# in (%*) do ( for %%# in (%*) do (
if /i "%%#"=="r1" set r1=1 if /i "%%#"=="re1" (set re1=1) else (set re1=)
if /i "%%#"=="r2" set r2=1 if /i "%%#"=="re2" (set re2=1) else (set re2=)
) )
:: Re-launch the script with x64 process if it was initiated by x86 process on x64 bit Windows :: Re-launch the script with x64 process if it was initiated by x86 process on x64 bit Windows
:: or with ARM64 process if it was initiated by x86/ARM32 process on ARM64 Windows :: or with ARM64 process if it was initiated by x86/ARM32 process on ARM64 Windows
if exist %SystemRoot%\Sysnative\cmd.exe if not defined r1 ( if exist %SystemRoot%\Sysnative\cmd.exe if not defined re1 (
setlocal EnableDelayedExpansion setlocal EnableDelayedExpansion
start %SystemRoot%\Sysnative\cmd.exe /c ""!_cmdf!" %* r1" start %SystemRoot%\Sysnative\cmd.exe /c ""!_cmdf!" %* re1"
exit /b exit /b
) )
:: Re-launch the script with ARM32 process if it was initiated by x64 process on ARM64 Windows :: Re-launch the script with ARM32 process if it was initiated by x64 process on ARM64 Windows
if exist %SystemRoot%\SysArm32\cmd.exe if %PROCESSOR_ARCHITECTURE%==AMD64 if not defined r2 ( if exist %SystemRoot%\SysArm32\cmd.exe if %PROCESSOR_ARCHITECTURE%==AMD64 if not defined re2 (
setlocal EnableDelayedExpansion setlocal EnableDelayedExpansion
start %SystemRoot%\SysArm32\cmd.exe /c ""!_cmdf!" %* r2" start %SystemRoot%\SysArm32\cmd.exe /c ""!_cmdf!" %* re2"
exit /b exit /b
) )
@ -103,6 +103,8 @@ set _unattended=0
set _args=%* set _args=%*
if defined _args set _args=%_args:"=% if defined _args set _args=%_args:"=%
if defined _args set _args=%_args:re1=%
if defined _args set _args=%_args:re2=%
if defined _args ( if defined _args (
for %%A in (%_args%) do ( for %%A in (%_args%) do (
if /i "%%A"=="-el" set _elev=1 if /i "%%A"=="-el" set _elev=1
@ -215,6 +217,7 @@ if defined terminal (
%psc% "%d2%" %nul2% | find /i "True" %nul1% && set terminal= %psc% "%d2%" %nul2% | find /i "True" %nul1% && set terminal=
) )
if defined ps32onArm goto :skipQE
if %_unattended%==1 goto :skipQE if %_unattended%==1 goto :skipQE
for %%# in (%_args%) do (if /i "%%#"=="-qedit" goto :skipQE) for %%# in (%_args%) do (if /i "%%#"=="-qedit" goto :skipQE)
@ -729,6 +732,8 @@ set _NCS=1
if %winbuild% LSS 10586 set _NCS=0 if %winbuild% LSS 10586 set _NCS=0
if %winbuild% GEQ 10586 reg query "HKCU\Console" /v ForceV2 %nul2% | find /i "0x0" %nul1% && (set _NCS=0) if %winbuild% GEQ 10586 reg query "HKCU\Console" /v ForceV2 %nul2% | find /i "0x0" %nul1% && (set _NCS=0)
echo "%PROCESSOR_ARCHITECTURE% %PROCESSOR_ARCHITEW6432%" | find /i "ARM64" %nul1% && (if %winbuild% LSS 21277 set ps32onArm=1)
if %_NCS% EQU 1 ( if %_NCS% EQU 1 (
for /F %%a in ('echo prompt $E ^| cmd') do set "esc=%%a" for /F %%a in ('echo prompt $E ^| cmd') do set "esc=%%a"
set "Red="41;97m"" set "Red="41;97m""

19
MAS/Separate-Files-Version/Troubleshoot.cmd

@ -33,24 +33,24 @@ set "PSModulePath=%ProgramFiles%\WindowsPowerShell\Modules;%SysPath%\WindowsPowe
set "_cmdf=%~f0" set "_cmdf=%~f0"
for %%# in (%*) do ( for %%# in (%*) do (
if /i "%%#"=="r1" set r1=1 if /i "%%#"=="re1" (set re1=1) else (set re1=)
if /i "%%#"=="r2" set r2=1 if /i "%%#"=="re2" (set re2=1) else (set re2=)
) )
:: Re-launch the script with x64 process if it was initiated by x86 process on x64 bit Windows :: Re-launch the script with x64 process if it was initiated by x86 process on x64 bit Windows
:: or with ARM64 process if it was initiated by x86/ARM32 process on ARM64 Windows :: or with ARM64 process if it was initiated by x86/ARM32 process on ARM64 Windows
if exist %SystemRoot%\Sysnative\cmd.exe if not defined r1 ( if exist %SystemRoot%\Sysnative\cmd.exe if not defined re1 (
setlocal EnableDelayedExpansion setlocal EnableDelayedExpansion
start %SystemRoot%\Sysnative\cmd.exe /c ""!_cmdf!" %* r1" start %SystemRoot%\Sysnative\cmd.exe /c ""!_cmdf!" %* re1"
exit /b exit /b
) )
:: Re-launch the script with ARM32 process if it was initiated by x64 process on ARM64 Windows :: Re-launch the script with ARM32 process if it was initiated by x64 process on ARM64 Windows
if exist %SystemRoot%\SysArm32\cmd.exe if %PROCESSOR_ARCHITECTURE%==AMD64 if not defined r2 ( if exist %SystemRoot%\SysArm32\cmd.exe if %PROCESSOR_ARCHITECTURE%==AMD64 if not defined re2 (
setlocal EnableDelayedExpansion setlocal EnableDelayedExpansion
start %SystemRoot%\SysArm32\cmd.exe /c ""!_cmdf!" %* r2" start %SystemRoot%\SysArm32\cmd.exe /c ""!_cmdf!" %* re2"
exit /b exit /b
) )
@ -103,6 +103,8 @@ set _unattended=0
set _args=%* set _args=%*
if defined _args set _args=%_args:"=% if defined _args set _args=%_args:"=%
if defined _args set _args=%_args:re1=%
if defined _args set _args=%_args:re2=%
if defined _args ( if defined _args (
for %%A in (%_args%) do ( for %%A in (%_args%) do (
if /i "%%A"=="-el" set _elev=1 if /i "%%A"=="-el" set _elev=1
@ -216,6 +218,7 @@ if defined terminal (
%psc% "%d2%" %nul2% | find /i "True" %nul1% && set terminal= %psc% "%d2%" %nul2% | find /i "True" %nul1% && set terminal=
) )
if defined ps32onArm goto :skipQE
if %_unattended%==1 goto :skipQE if %_unattended%==1 goto :skipQE
for %%# in (%_args%) do (if /i "%%#"=="-qedit" goto :skipQE) for %%# in (%_args%) do (if /i "%%#"=="-qedit" goto :skipQE)
@ -1138,6 +1141,8 @@ exit /b
set permerror= set permerror=
if not exist "%tokenstore%\" set "permerror=Error Found In Token Folder" if not exist "%tokenstore%\" set "permerror=Error Found In Token Folder"
if defined ps32onArm exit /b
for %%# in ( for %%# in (
"%tokenstore%+FullControl" "%tokenstore%+FullControl"
"HKLM:\SYSTEM\WPA+QueryValues, EnumerateSubKeys, WriteKey" "HKLM:\SYSTEM\WPA+QueryValues, EnumerateSubKeys, WriteKey"
@ -1429,6 +1434,8 @@ set _NCS=1
if %winbuild% LSS 10586 set _NCS=0 if %winbuild% LSS 10586 set _NCS=0
if %winbuild% GEQ 10586 reg query "HKCU\Console" /v ForceV2 %nul2% | find /i "0x0" %nul1% && (set _NCS=0) if %winbuild% GEQ 10586 reg query "HKCU\Console" /v ForceV2 %nul2% | find /i "0x0" %nul1% && (set _NCS=0)
echo "%PROCESSOR_ARCHITECTURE% %PROCESSOR_ARCHITEW6432%" | find /i "ARM64" %nul1% && (if %winbuild% LSS 21277 set ps32onArm=1)
if %_NCS% EQU 1 ( if %_NCS% EQU 1 (
for /F %%a in ('echo prompt $E ^| cmd') do set "esc=%%a" for /F %%a in ('echo prompt $E ^| cmd') do set "esc=%%a"
set "Red="41;97m"" set "Red="41;97m""

Loading…
Cancel
Save