Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @echo off
- pushd "%~dp0"
- dir /b %SystemRoot%\servicing\Packages\Microsoft-Windows-GroupPolicy-ClientExtensions-Package~3*.mum >List.txt
- dir /b %SystemRoot%\servicing\Packages\Microsoft-Windows-GroupPolicy-ClientTools-Package~3*.mum >>List.txt
- for /f %%i in ('findstr /i . List.txt 2^>nul') do dism /online /norestart /add-package:"%SystemRoot%\servicing\Packages\%%i"
- pause
Advertisement
Comments
-
- Has anyone checked if this code has any malware?
- I know it doesn't, but just to be sure.
-
- Lines 4 and 5 basically do the same thing - search C:\Windows for the Windows Update Package files and add them to a text list.
- Line 7 uses Windows' Deployment Image Servicing and Management tool to retrieve the file names from the list and install them.
- This uses Windows' own files and tools, so no malware here.
-
- I see, so that's how it works. Thanks for confirming.
-
- @echo off
- nul 2>&1 "%SYSTEMROOT%\system32\cacls.exe" "%SYSTEMROOT%\system32\config\system"
- REM --> If error flag set, we do not have admin.
- if '%errorlevel%' NEQ '0' (
- echo Requesting administrative privileges…
- goto UACPrompt
- ) else ( goto gotAdmin )
- :UACPrompt
- echo Set UAC = CreateObject^("Shell.Application"^) > "%temp%\getadmin.vbs"
- echo UAC.ShellExecute "%~s0", "", "", "runas", 1 >> "%temp%\getadmin.vbs"
- "%temp%\getadmin.vbs"
- exit /B
- :gotAdmin
- if exist "%temp%\getadmin.vbs" ( del "%temp%\getadmin.vbs" )
- pushd "%CD%"
- CD /D "%~dp0"
- pushd "%~dp0"
- dir /b %SystemRoot%\servicing\Packages\Microsoft-Windows-GroupPolicy-ClientExtensions-Package~3.mum >List.txt dir /b %SystemRoot%\servicing\Packages\Microsoft-Windows-GroupPolicy-ClientTools-Package~3.mum >>List.txt
- for /f %%i in ('findstr /i . List.txt 2^>nul') do dism /online /norestart /add-package:"%SystemRoot%\servicing\Packages\%%i"
- can someone analyse this too as it was claimed that this will do the same but it opened cmd popup with infinte loop
-
- Hi I got this error and I don't know what to do
- Processing 1 of 1 - Adding package Microsoft-Windows-GroupPolicy-ClientExtensions-Package~31bf3856ad364e35~amd64~~10.0.26100.1591
- [==========================100.0%==========================]
- An error occurred - Microsoft-Windows-GroupPolicy-ClientExtensions-Package Error: 0x8007371b
- Error: 14107
- One or more required members of the transaction are not present.
- The DISM log file can be found at C:\WINDOWS\Logs\DISM\dism.log
- Deployment Image Servicing and Management tool
- Version: 10.0.26100.5074
Add Comment
Please, Sign In to add comment