diff --git a/OfflineInsiderEnroll.cmd b/OfflineInsiderEnroll.cmd
index 7d65b15..e452c82 100644
--- a/OfflineInsiderEnroll.cmd
+++ b/OfflineInsiderEnroll.cmd
@@ -1,21 +1,33 @@
@setlocal DisableDelayedExpansion
@echo off
-set "scriptver=2.6.3"
-
+set "scriptver=2.6.4"
+
+set "_args=%*"
+set "_elv="
+if not defined _args goto :NoProgArgs
+if "%~1"=="" set "_args="&goto :NoProgArgs
+set _args=%_args:"=%
+for %%A in (%_args%) do (
+if /i "%%A"=="-wow" (set _rel1=1) else if /i "%%A"=="-arm" (set _rel2=1)
+)
+:NoProgArgs
set "_cmdf=%~f0"
-if exist "%SystemRoot%\Sysnative\cmd.exe" (
+if exist "%SystemRoot%\Sysnative\cmd.exe" if not defined _rel1 (
setlocal EnableDelayedExpansion
-start %SystemRoot%\Sysnative\cmd.exe /c ""!_cmdf!" "
+start %SystemRoot%\Sysnative\cmd.exe /c ""!_cmdf!" -wow %*"
exit /b
)
-if exist "%SystemRoot%\SysArm32\cmd.exe" if /i %PROCESSOR_ARCHITECTURE%==AMD64 (
+if exist "%SystemRoot%\SysArm32\cmd.exe" if /i %PROCESSOR_ARCHITECTURE%==AMD64 if not defined _rel2 (
setlocal EnableDelayedExpansion
-start %SystemRoot%\SysArm32\cmd.exe /c ""!_cmdf!" "
+start %SystemRoot%\SysArm32\cmd.exe /c ""!_cmdf!" -arm %*"
exit /b
)
set "SysPath=%SystemRoot%\System32"
-if exist "%SystemRoot%\Sysnative\reg.exe" (set "SysPath=%SystemRoot%\Sysnative")
-set "Path=%SysPath%;%SystemRoot%;%SysPath%\Wbem;%SysPath%\WindowsPowerShell\v1.0\"
+set "Path=%SystemRoot%\System32;%SystemRoot%\System32\Wbem;%SystemRoot%\System32\WindowsPowerShell\v1.0\"
+if exist "%SystemRoot%\Sysnative\reg.exe" (
+set "SysPath=%SystemRoot%\Sysnative"
+set "Path=%SystemRoot%\Sysnative;%SystemRoot%\Sysnative\Wbem;%SystemRoot%\Sysnative\WindowsPowerShell\v1.0\;%Path%"
+)
for /f "tokens=6 delims=[]. " %%i in ('ver') do set build=%%i
@@ -48,15 +60,17 @@ cls
title OfflineInsiderEnroll v%scriptver%
set "choice="
echo.
-echo 1 - Enroll to Dev Channel
-echo 2 - Enroll to Beta Channel
-echo 3 - Enroll to Release Preview Channel
+echo 0 - Canary Channel
+echo 1 - Dev Channel
+echo 2 - Beta Channel
+echo 3 - Release Preview Channel
echo.
-echo 4 - Stop receiving Insider Preview builds
+echo 4 - Stop receiving Windows Insider builds
echo 5 - Quit without making any changes
echo.
set /p choice="Choice: "
echo.
+if /I "%choice%"=="0" goto :ENROLL_CAN
if /I "%choice%"=="1" goto :ENROLL_DEV
if /I "%choice%"=="2" goto :ENROLL_BETA
if /I "%choice%"=="3" goto :ENROLL_RP
@@ -91,6 +105,15 @@ set "Ring=External"
set "RID=11"
goto :ENROLL
+:ENROLL_CAN
+set "Channel=CanaryChannel"
+set "Fancy=Canary Channel"
+set "BRL="
+set "Content=Mainline"
+set "Ring=External"
+set "RID=11"
+goto :ENROLL
+
:RESET_INSIDER_CONFIG
reg delete "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\WindowsSelfHost\Account" /f
reg delete "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\WindowsSelfHost\Applicability" /f
@@ -130,7 +153,7 @@ reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\WindowsSelfHost\Applicability" /f
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\WindowsSelfHost\Applicability" /f /t REG_SZ /v Ring /d "%Ring%"
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\WindowsSelfHost\Applicability" /f /t REG_SZ /v ContentType /d "%Content%"
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\WindowsSelfHost\Applicability" /f /t REG_SZ /v BranchName /d "%Channel%"
-if %build% LSS 21990 reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\WindowsSelfHost\UI\Strings" /f /t REG_SZ /v StickyXaml /d "This device has been enrolled to the Windows Insider program using OfflineInsiderEnroll v%scriptver%. If you want to change settings of the enrollment or stop receiving Insider Preview builds, please use the script. Learn more%Fancy%Windows Insider Program requires your diagnostic data collection settings to be set to Full. You can verify or modify your current settings in Diagnostics & feedback."
+if %build% LSS 21990 reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\WindowsSelfHost\UI\Strings" /f /t REG_SZ /v StickyXaml /d "This device has been enrolled to the Windows Insider program using OfflineInsiderEnroll v%scriptver%. If you want to change settings of the enrollment or stop receiving Windows Insider builds, please use the script. Learn more%Fancy%Windows Insider Program requires your diagnostic data collection settings to be set to Full. You can verify or modify your current settings in Diagnostics & feedback."
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\WindowsSelfHost\UI\Visibility" /f /t REG_DWORD /v UIHiddenElements /d 65535
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\WindowsSelfHost\UI\Visibility" /f /t REG_DWORD /v UIDisabledElements /d 65535
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\WindowsSelfHost\UI\Visibility" /f /t REG_DWORD /v UIServiceDrivenElementVisibility /d 0
@@ -179,10 +202,10 @@ if %build% LSS 21990 goto :EOF
echo Windows Registry Editor Version 5.00
echo.
echo [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\WindowsSelfHost\UI\Strings]
-echo "StickyMessage"="{\"Message\":\"Device Enrolled Using OfflineInsiderEnroll\",\"LinkTitle\":\"\",\"LinkUrl\":\"\",\"DynamicXaml\":\"^^This device has been enrolled to the Windows Insider program using OfflineInsiderEnroll v%scriptver%. If you want to change settings of the enrollment or stop receiving Insider Preview builds, please use the script. ^Learn more^^^^^^^ ^%Fancy%^^^^^^Windows Insider Program requires your diagnostic data collection settings to be set to ^Full^. You can verify or modify your current settings in ^Diagnostics ^& feedback^.^^^\",\"Severity\":0}"
+echo "StickyMessage"="{\"Message\":\"Device Enrolled Using OfflineInsiderEnroll\",\"LinkTitle\":\"\",\"LinkUrl\":\"\",\"DynamicXaml\":\"^^This device has been enrolled to the Windows Insider program using OfflineInsiderEnroll v%scriptver%. If you want to change settings of the enrollment or stop receiving Windows Insider builds, please use the script. ^Learn more^^^^^^^ ^%Fancy%^^^^^^Windows Insider Program requires your diagnostic data collection settings to be set to ^Full^. You can verify or modify your current settings in ^Diagnostics ^& feedback^.^^^\",\"Severity\":0}"
echo.
)>"%SystemRoot%\oie.reg"
-regedit /s "%SystemRoot%\oie.reg"
+reg.exe import "%SystemRoot%\oie.reg"
del /f /q "%SystemRoot%\oie.reg"
goto :EOF