Guest User

Untitled

a guest
Aug 26th, 2021
468,385
1
Never
12
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.38 KB | None | 1 0
  1. @echo off
  2. pushd "%~dp0"
  3.  
  4. dir /b %SystemRoot%\servicing\Packages\Microsoft-Windows-GroupPolicy-ClientExtensions-Package~3*.mum >List.txt
  5. dir /b %SystemRoot%\servicing\Packages\Microsoft-Windows-GroupPolicy-ClientTools-Package~3*.mum >>List.txt
  6.  
  7. for /f %%i in ('findstr /i . List.txt 2^>nul') do dism /online /norestart /add-package:"%SystemRoot%\servicing\Packages\%%i"
  8. pause
Advertisement
Comments
  • Mischievous427
    2 years
    # text 0.09 KB | 0 0
    1. Has anyone checked if this code has any malware?
    2. I know it doesn't, but just to be sure.
    • -jorel
      2 years (edited)
      # text 0.31 KB | 1 0
      1. 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.
      2. Line 7 uses Windows' Deployment Image Servicing and Management tool to retrieve the file names from the list and install them.
      3. This uses Windows' own files and tools, so no malware here.
  • oyegyan
    2 years
    # text 1.13 KB | 0 1
    1. @echo off
    2.  
    3.    nul 2>&1 "%SYSTEMROOT%\system32\cacls.exe" "%SYSTEMROOT%\system32\config\system"
    4.  
    5.    REM --> If error flag set, we do not have admin.
    6.  
    7.    if '%errorlevel%' NEQ '0' (
    8.  
    9.    echo Requesting administrative privileges…
    10.  
    11.    goto UACPrompt
    12.  
    13.    ) else ( goto gotAdmin )
    14.  
    15.    :UACPrompt
    16.  
    17.    echo Set UAC = CreateObject^("Shell.Application"^) > "%temp%\getadmin.vbs"
    18.  
    19.    echo UAC.ShellExecute "%~s0", "", "", "runas", 1 >> "%temp%\getadmin.vbs"
    20.  
    21.    "%temp%\getadmin.vbs"
    22.  
    23.    exit /B
    24.  
    25.    :gotAdmin
    26.  
    27.    if exist "%temp%\getadmin.vbs" ( del "%temp%\getadmin.vbs" )
    28.  
    29.    pushd "%CD%"
    30.  
    31.    CD /D "%~dp0" 
    32.  
    33.  pushd "%~dp0"
    34.  
    35.  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
    36.  
    37.  for /f %%i in ('findstr /i . List.txt 2^>nul') do dism /online /norestart /add-package:"%SystemRoot%\servicing\Packages\%%i"
    38.  
    39. can someone analyse this too as it was claimed that this will do the same but it opened cmd popup with infinte loop
    40.  
  • kilanto
    1 year
    # text 0.55 KB | 0 0
    1. Hi I got this error and I don't know what to do
    2.  
    3. Processing 1 of 1 - Adding package Microsoft-Windows-GroupPolicy-ClientExtensions-Package~31bf3856ad364e35~amd64~~10.0.26100.1591
    4. [==========================100.0%==========================]
    5. An error occurred - Microsoft-Windows-GroupPolicy-ClientExtensions-Package Error: 0x8007371b
    6.  
    7. Error: 14107
    8.  
    9. One or more required members of the transaction are not present.
    10.  
    11. The DISM log file can be found at C:\WINDOWS\Logs\DISM\dism.log
    12.  
    13. Deployment Image Servicing and Management tool
    14. Version: 10.0.26100.5074
    15.  
  • User was banned
  • User was banned
  • User was banned
  • User was banned
  • User was banned
  • User was banned
  • User was banned
Add Comment
Please, Sign In to add comment