الحالة
مغلق و غير مفتوح للمزيد من الردود.

Abu.amr

مراقب قسم البرامج والتصميم والمونتاج العام
طـــاقم الإدارة
★★ نجم المنتدى ★★
نجم الشهر
فريق دعم البرامج العامة
فريق قسـم الهواتف الذكية
إنضم
18 مايو 2023
المشاركات
2,745
مستوى التفاعل
10,647
النقاط
6,030
الإقامة
Egypt
غير متصل
9xXPrh8.png



You can use this script in case you want to clear and save some space at your hard disk after Windows Update performs a major version install.
You can copy the contents and save it to a file with a .BAT extension and run it as an administrator.
It should work just fine, tested across Windows 10 and Windows 10 Insider Preview, plus Windows 11 (RTM, Release Preview, Beta, Dev and Canary current builds).

ينقل كل هذا الكود فى ملف تكست وتغير الصيغة الى .bat لتنفيذ الاوامر سياخذ بعض الوقت اتركة لينتهى

كود:
:: Elevation script from StackOverflow

:: Begin Elevation script

@ECHO OFF
setlocal EnableDelayedExpansion

::net file to test privileges, 1>NUL redirects output, 2>NUL redirects errors
NET FILE 1>NUL 2>NUL
if '%errorlevel%' == '0' ( goto START ) else ( goto getPrivileges )

:getPrivileges
if '%1'=='ELEV' ( goto START )

set "batchPath=%~f0"
set "batchArgs=ELEV"

::Add quotes to the batch path, if needed
set "script=%0"
set script=%script:"=%
IF '%0'=='!script!' ( GOTO PathQuotesDone )
    set "batchPath=""%batchPath%"""
:PathQuotesDone

::Add quotes to the arguments, if needed.
:ArgLoop
IF '%1'=='' ( GOTO EndArgLoop ) else ( GOTO AddArg )
    :AddArg
    set "arg=%1"
    set arg=%arg:"=%
    IF '%1'=='!arg!' ( GOTO NoQuotes )
        set "batchArgs=%batchArgs% "%1""
        GOTO QuotesDone
        :NoQuotes
        set "batchArgs=%batchArgs% %1"
    :QuotesDone
    shift
    GOTO ArgLoop
:EndArgLoop

::Create and run the vb script to elevate the batch file
ECHO Set UAC = CreateObject^("Shell.Application"^) > "%temp%\OEgetPrivileges.vbs"
ECHO UAC.ShellExecute "cmd", "/c ""!batchPath! !batchArgs!""", "", "runas", 1 >> "%temp%\OEgetPrivileges.vbs"
"%temp%\OEgetPrivileges.vbs"
exit /B

:START
::Remove the elevation tag and set the correct working directory
IF '%1'=='ELEV' ( shift /1 )
cd /d %~dp0

::Do your adminy thing here...

:: End Elevation Script
:: Begin cleanup script

start /B /wait rundll32.exe pnpclean.dll,RunDLL_PnpClean /drivers/maxclean
start /B /wait dism /Online /Cleanup-Image /CheckHealth
start /B /wait sfc /scannow
start /B /wait dism /Online /Cleanup-Image /RestoreHealth
start /B /wait dism /online /Cleanup-Image /Startcomponentcleanup /resetbase

pause
 

كامل الاحترام والتقدير وكل التحيات الطيبة
جزيل الشكر وبارك الله فيك

ما المقصود بـ (after Windows Update performs a major version install)
هل المقصود التحديث السنوي كـ 23H2 و 24H2 وهكذا
أم المقصود التحديثات الشهرية

أفادنا الله بعلمك وعملك
 
توقيع : aldswqi
كامل الاحترام والتقدير وكل التحيات الطيبة
جزيل الشكر وبارك الله فيك

ما المقصود بـ (after Windows Update performs a major version install)
هل المقصود التحديث السنوي كـ 23H2 و 24H2 وهكذا
أم المقصود التحديثات الشهرية

أفادنا الله بعلمك وعملك


التحديثات الكبيرة
 
بارك الله بك اخي الكريم

وهيدا كود من cmd

ينظف كافة المخلفات بشكل تام

32
Compact.exe /CompactOS:query
64
Compact.exe /CompactOS:always
 
توقيع : hani forcehani force is verified member.
عفوا اخي الغالي ابو عمر
قد سبب ضرر لم تعد تفتح الصور يغلق الموضوع
طبعا انا شغلته ولم يفعل شئ
بس وقف فتح الصور
انا الان ارفع الصور من جهاز اخر

Snap6.webp

Snap5.webp
 
توقيع : hani forcehani force is verified member.
الحالة
مغلق و غير مفتوح للمزيد من الردود.
عودة
أعلى