Open joeyoropesa-dev opened 1 year ago
You mean while updating through windows updater on unsupported device right?
@echo off
cls
>nul 2>&1 "%SYSTEMROOT%\system32\cacls.exe" "%SYSTEMROOT%\system32\config\system"
if '%errorlevel%' NEQ '0' (
goto UACPrompt
) else ( goto gotAdmin )
:UACPrompt
::Method From CSDN
echo Set UAC = CreateObject^("Shell.Application"^) > "%temp%\getadmin.vbs"
echo UAC.ShellExecute "%~s0", "", "", "runas", 1 >> "%temp%\getadmin.vbs"
"%temp%\getadmin.vbs"
exit /B
:gotAdmin
::Method From CSDN
if exist "%temp%\getadmin.vbs" ( del "%temp%\getadmin.vbs" )
pushd "%CD%"
CD /D "%~dp0"
:begin
ping -n 2 127.0.0.1
echo Checking / Waiting...
if exist C:\$WINDOWS.~BT\Sources\appraiserres.dll (goto start) else (goto begin)
:start
ping -n 2 127.0.0.1
REG IMPORT bypass.reg
copy /y appraiserres.dll C:\$WINDOWS.~BT\Sources
attrib +r C:\$WINDOWS.~BT\Sources\appraiserres.dll
echo Done!
pause
- Save thee code as updater.bat
- Place it in the folder where you have downloaded the bypass.reg file and appraiserres.dll file
- Run the bat file when your windows updator starts downloading the update
@echo off cls >nul 2>&1 "%SYSTEMROOT%\system32\cacls.exe" "%SYSTEMROOT%\system32\config\system" if '%errorlevel%' NEQ '0' ( goto UACPrompt ) else ( goto gotAdmin ) :UACPrompt ::Method From CSDN echo Set UAC = CreateObject^("Shell.Application"^) > "%temp%\getadmin.vbs" echo UAC.ShellExecute "%~s0", "", "", "runas", 1 >> "%temp%\getadmin.vbs" "%temp%\getadmin.vbs" exit /B :gotAdmin ::Method From CSDN if exist "%temp%\getadmin.vbs" ( del "%temp%\getadmin.vbs" ) pushd "%CD%" CD /D "%~dp0" :begin ping -n 2 127.0.0.1 echo Checking / Waiting... if exist C:\$WINDOWS.~BT\Sources\appraiserres.dll (goto start) else (goto begin) :start ping -n 2 127.0.0.1 REG IMPORT bypass.reg copy /y appraiserres.dll C:\$WINDOWS.~BT\Sources attrib +r C:\$WINDOWS.~BT\Sources\appraiserres.dll echo Done! pause
Nice, how can I put that code into registry so when I click the button to check for updates, the script should begin to run in the background. And if the checking for updates don't find any update, script can (but it's not required) to stop running in background process automatically
I've used background in this case in another meaning. The script command prompt and icon are completely invisible and running in the process that are not visible to the user so that it will looks like more natively the process for updating Windows without seeing how the commands works because everything is done in hidden mode.
Anyway, thank you for this - this anyway helps much better than typing all this manually and coping the file manually - you're the best 🥰
It would be nice if you can create some app that works like a service. The app that injects Windows Update Services so when it downloads Windows 11 updates on unsupported devices from the insider channels, it will do invisible execution to copy/paste required dll file and even to re-register modifications in registry editor to modify immediatelly and automatically the update image that is currently downloading and installing. Also, to program properly permissions to that dll file to not be able to be replaced by downloading the update.
If you can't develop that kind of sofware that injects Windows Update Services to do all those tasks while updating, it would be nice if you have some people who knows to develop to help you in this.
I think this will be so useful for unsupported hardware that runs Windows 11 Insider builds especially if they are often updating their device.