@echo off
CLS
color 1f
TITLE Enable the Windows Connect Now wizard.

TITLE Checking for Admin...
echo.
cd %systemroot%\system32
call :IsAdmin


TITLE Enable the Windows Connect Now wizard.
cls
echo Setting Registry to enable the Windows Connect Now wizard.

REG add "HKLM\SOFTWARE\Policies\Microsoft\Windows\WCN\UI" /v "DisableWcnUi" /t REG_DWORD /d "0" /f >NUL 2>&1
REG add "HKCU\SOFTWARE\Policies\Microsoft\Windows\WCN\UI" /v "DisableWcnUi" /t REG_DWORD /d "0" /f >NUL 2>&1

echo.
echo Done.  Reboot IS required.

:Finished
echo.
pause

exit

=====================================================================================
:IsAdmin
Reg.exe query "HKU\S-1-5-19\Environment"
If Not %ERRORLEVEL% EQU 0 (
 Cls & echo. & Echo You must have administrator rights to continue ... & echo.
 Pause & Exit
)
Cls

exit /b
