Automatisation de maintenance avec la commande « sageset – sagerun »

Ouvrez une fenêtre de commande puis tapez:

cleanmgr /sageset:1

pour choisir le numéro de l’action

S’affiche une fenêtre de l’outil de maintenance, cochez selon vos besoins puis validez

Pour rappeler la commande il suffira de taper dans la fenêtre de commande:

cleanmgr /sagerun:1

Vous pouvez automatiser l’action par un script en poussant la chose plus loin avec la commande

regedit /s

Pour cela rendez vous dans le registre

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches

Sauvegardez le registre vers l’emplacement de votre choix en la nommant par le numéro de commande cleamgr, l’association ne saura que meilleur

Vous aurez ainsi un ficher cleamgr1.reg

Ouvrez votre fichier.reg à l’aide du bloc notes, la commande sagerun est identifié par la clé de registre dword:0000007d dans mon exemple, modifiez le fichier selon vos besoins

Aperçu du fichier registre:

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches]

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches\Active Setup Temp Folders]
@="{C0E13E61-0CC6-11d1-BBB6-0060978B2AE6}"
"Folder"="C:\\Windows\\msdownld.tmp|?:\\msdownld.tmp"
"Flags"=hex:7c,00,00,00
"LastAccess"=hex:02,00,00,00
"FileList"="*.tmp"
"Description"="These files should no longer be needed. They were originally created by a setup program that is no longer running."
"Priority"=hex:64,00,00,00
"Display"="Temporary Setup Files"

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches\Content Indexer Cleaner]
@="{A9B48EAC-3ED8-11d2-8216-00C04FB687DA}"
"Flags"=dword:00000141
"Folder"="?:\\Catalog.wci"
"PropertyBag"="{24400D16-5754-11d2-8218-00C04FB687DA}"
"FileList"="*.*"
"Priority"=dword:0000012c

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches\Downloaded Program Files]
@="{8369AB20-56C9-11D0-94E8-00AA0059CE02}"
"AdvancedButtonText"="@C:\\Windows\\System32\\occache.dll,-1072"
"Description"="@C:\\Windows\\System32\\occache.dll,-1071"
"Priority"=hex:64,00,00,00
"Display"="@C:\\Windows\\System32\\occache.dll,-1070"

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches\GameNewsFiles]
@="{06EEE695-542D-46F6-AEAB-FA2F1B2102D3}"
"IconPath"="C:\\Windows\\System32\\gameux.dll,-203"

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches\GameStatisticsFiles]
@="{06EEE695-542D-46F6-AEAB-FA2F1B2102D3}"
"IconPath"="C:\\Windows\\System32\\gameux.dll,-203"

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches\GameUpdateFiles]
@="{06EEE695-542D-46F6-AEAB-FA2F1B2102D3}"
"IconPath"="C:\\Windows\\System32\\gameux.dll,-203"

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches\Internet Cache Files]
@="{9B0EFD60-F7B0-11D0-BAEF-00C04FC308C9}"
"AdvancedButtonText"="&View Files"
"Description"="The Temporary Internet Files folder contains Web pages stored on your hard disk for quick viewing. Your personalized settings for Web pages will be left intact."
"Priority"=dword:00000064
"Display"="Temporary Internet Files"
"Autorun"=dword:00000001

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches\Memory Dump Files]
@="{C0E13E61-0CC6-11d1-BBB6-0060978B2AE6}"
"Flags"=dword:00000020
"Folder"=hex(2):25,00,57,00,49,00,4e,00,44,00,49,00,52,00,25,00,00,00
"LastAccess"=dword:0000001e
"FileList"="*.dmp"
"Description"="Files created by Windows"
"Display"="Debug Dump Files"

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches\Microsoft Office Temp Files]
@="{F77A49F1-AFCE-4946-953F-F578CD9036B4}"

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches\Offline Pages Files]
@="{8E6E6079-0CB7-11d2-8F10-0000F87ABD16}"
"AdvancedButtonText"="&View Pages"
"Description"="Offline pages are Web pages that are stored on your computer so you can view them without being connected to the Internet.  If you delete these pages now, you can still view your favorites offline later by synchronizing them.  Your personalized settings for Web pages will be left intact."
"Priority"=dword:00000064
"Display"="Offline Web Pages"

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches\Old ChkDsk Files]
@="{C0E13E61-0CC6-11d1-BBB6-0060978B2AE6}"
"IconPath"=hex(2):25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,6f,00,6f,00,\
  74,00,25,00,5c,00,53,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,44,\
  00,41,00,54,00,41,00,43,00,4c,00,45,00,4e,00,2e,00,44,00,4c,00,4c,00,2c,00,\
  33,00,00,00
"Flags"=dword:00000120
"Folder"="?:\\FOUND.000|?:\\FOUND.001|?:\\FOUND.002|?:\\FOUND.003|?:\\FOUND.004|?:\\FOUND.005|?:\\FOUND.006|?:\\FOUND.007|?:\\FOUND.008|?:\\FOUND.009"
"PropertyBag"="{60F6E464-4DEF-11d2-B2D9-00C04F8EEC8C}"
"FileList"="*.CHK"

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches\Previous Installations]
@="{84e04a55-2d42-4909-86e3-62fd11483e8b}"
"IconPath"=hex(2):25,00,73,00,79,00,73,00,74,00,65,00,6d,00,72,00,6f,00,6f,00,\
  74,00,25,00,5c,00,73,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,73,\
  00,65,00,74,00,75,00,70,00,63,00,6c,00,6e,00,2e,00,64,00,6c,00,6c,00,2c,00,\
  30,00,00,00
"Description"=hex(2):40,00,25,00,73,00,79,00,73,00,74,00,65,00,6d,00,72,00,6f,\
  00,6f,00,74,00,25,00,5c,00,73,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,\
  5c,00,73,00,65,00,74,00,75,00,70,00,63,00,6c,00,6e,00,2e,00,64,00,6c,00,6c,\
  00,2c,00,2d,00,31,00,30,00,30,00,33,00,00,00
"Display"=hex(2):40,00,25,00,73,00,79,00,73,00,74,00,65,00,6d,00,72,00,6f,00,\
  6f,00,74,00,25,00,5c,00,73,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,\
  00,73,00,65,00,74,00,75,00,70,00,63,00,6c,00,6e,00,2e,00,64,00,6c,00,6c,00,\
  2c,00,2d,00,31,00,30,00,30,00,32,00,00,00
"SetupPrevInst"=dword:00000001

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches\Recycle Bin]
@="{5ef4af3a-f726-11d0-b8a2-00c04fc309a4}"

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches\Service Pack Cleanup]
@="{E3A9BD50-51AE-410f-9706-0BA0D68B9A94}"
"IconPath"=hex(2):25,00,73,00,79,00,73,00,74,00,65,00,6d,00,72,00,6f,00,6f,00,\
  74,00,25,00,5c,00,73,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,73,\
  00,63,00,61,00,76,00,65,00,6e,00,67,00,65,00,75,00,69,00,2e,00,64,00,6c,00,\
  6c,00,2c,00,30,00,00,00
"Description"=hex(2):40,00,25,00,73,00,79,00,73,00,74,00,65,00,6d,00,72,00,6f,\
  00,6f,00,74,00,25,00,5c,00,73,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,\
  5c,00,73,00,63,00,61,00,76,00,65,00,6e,00,67,00,65,00,75,00,69,00,2e,00,64,\
  00,6c,00,6c,00,2c,00,2d,00,31,00,30,00,30,00,31,00,00,00
"Display"=hex(2):40,00,25,00,73,00,79,00,73,00,74,00,65,00,6d,00,72,00,6f,00,\
  6f,00,74,00,25,00,5c,00,73,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,\
  00,73,00,63,00,61,00,76,00,65,00,6e,00,67,00,65,00,75,00,69,00,2e,00,64,00,\
  6c,00,6c,00,2c,00,2d,00,31,00,30,00,30,00,30,00,00,00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches\Setup Log Files]
@="{C0E13E61-0CC6-11d1-BBB6-0060978B2AE6}"
"Flags"=dword:00000020
"Folder"=hex(2):25,00,57,00,49,00,4e,00,44,00,49,00,52,00,25,00,00,00
"LastAccess"=dword:0000001e
"FileList"="setup*.log|setup*.old|setuplog.txt|winnt32.log"
"Description"=hex(2):40,00,25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,6f,\
  00,6f,00,74,00,25,00,5c,00,53,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,\
  5c,00,44,00,41,00,54,00,41,00,43,00,4c,00,45,00,4e,00,2e,00,44,00,4c,00,4c,\
  00,2c,00,2d,00,31,00,30,00,31,00,31,00,00,00
"Display"=hex(2):40,00,25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,6f,00,\
  6f,00,74,00,25,00,5c,00,53,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,\
  00,44,00,41,00,54,00,41,00,43,00,4c,00,45,00,4e,00,2e,00,44,00,4c,00,4c,00,\
  2c,00,2d,00,31,00,30,00,31,00,30,00,00,00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches\System error memory dump files]
@="{C0E13E61-0CC6-11d1-BBB6-0060978B2AE6}"
"FileList"="*.dmp"
"Flags"=dword:0000007d
"Folder"=hex(2):25,00,57,00,49,00,4e,00,44,00,49,00,52,00,25,00,00,00
"IconPath"=hex(2):25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,6f,00,6f,00,\
  74,00,25,00,5c,00,73,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,77,\
  00,65,00,72,00,2e,00,64,00,6c,00,6c,00,2c,00,30,00,00,00
"Display"=hex(2):40,00,25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,6f,00,\
  6f,00,74,00,25,00,5c,00,73,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,\
  00,77,00,65,00,72,00,66,00,61,00,75,00,6c,00,74,00,2e,00,65,00,78,00,65,00,\
  2c,00,2d,00,31,00,30,00,30,00,00,00
"Description"=hex(2):40,00,25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,6f,\
  00,6f,00,74,00,25,00,5c,00,73,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,\
  5c,00,77,00,65,00,72,00,66,00,61,00,75,00,6c,00,74,00,2e,00,65,00,78,00,65,\
  00,2c,00,2d,00,31,00,30,00,31,00,00,00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches\System error minidump files]
@="{C0E13E61-0CC6-11d1-BBB6-0060978B2AE6}"
"FileList"="*.dmp"
"Flags"=dword:0000007d
"Folder"=hex(2):25,00,57,00,49,00,4e,00,44,00,49,00,52,00,25,00,5c,00,4d,00,69,\
  00,6e,00,69,00,64,00,75,00,6d,00,70,00,00,00
"IconPath"=hex(2):25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,6f,00,6f,00,\
  74,00,25,00,5c,00,73,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,77,\
  00,65,00,72,00,2e,00,64,00,6c,00,6c,00,2c,00,30,00,00,00
"Display"=hex(2):40,00,25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,6f,00,\
  6f,00,74,00,25,00,5c,00,73,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,\
  00,77,00,65,00,72,00,66,00,61,00,75,00,6c,00,74,00,2e,00,65,00,78,00,65,00,\
  2c,00,2d,00,31,00,30,00,32,00,00,00
"Description"=hex(2):40,00,25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,6f,\
  00,6f,00,74,00,25,00,5c,00,73,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,\
  5c,00,77,00,65,00,72,00,66,00,61,00,75,00,6c,00,74,00,2e,00,65,00,78,00,65,\
  00,2c,00,2d,00,31,00,30,00,33,00,00,00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches\Temporary Files]
@="{C0E13E61-0CC6-11d1-BBB6-0060978B2AE6}"
"PropertyBag"="{60F6E465-4DEF-11d2-B2D9-00C04F8EEC8C}"
"Flags"=dword:00000041
"Folder"=hex(2):25,00,54,00,45,00,4d,00,50,00,25,00,00,00
"LastAccess"=dword:00000007
"FileList"="*.*"

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches\Temporary Setup Files]
@="{84e04a55-2d42-4909-86e3-62fd11483e8b}"
"IconPath"=hex(2):25,00,73,00,79,00,73,00,74,00,65,00,6d,00,72,00,6f,00,6f,00,\
  74,00,25,00,5c,00,73,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,73,\
  00,65,00,74,00,75,00,70,00,63,00,6c,00,6e,00,2e,00,64,00,6c,00,6c,00,2c,00,\
  30,00,00,00
"Description"=hex(2):40,00,25,00,73,00,79,00,73,00,74,00,65,00,6d,00,72,00,6f,\
  00,6f,00,74,00,25,00,5c,00,73,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,\
  5c,00,73,00,65,00,74,00,75,00,70,00,63,00,6c,00,6e,00,2e,00,64,00,6c,00,6c,\
  00,2c,00,2d,00,31,00,30,00,30,00,31,00,00,00
"SetupDirectories"="$Windows.~BT;$Windows.~LS"
"Display"=hex(2):40,00,25,00,73,00,79,00,73,00,74,00,65,00,6d,00,72,00,6f,00,\
  6f,00,74,00,25,00,5c,00,73,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,\
  00,73,00,65,00,74,00,75,00,70,00,63,00,6c,00,6e,00,2e,00,64,00,6c,00,6c,00,\
  2c,00,2d,00,31,00,30,00,30,00,30,00,00,00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches\Thumbnail Cache]
@="{889900c3-59f3-4c2f-ae21-a409ea01e605}"

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches\Update Cleanup]
@="{C1A6713B-F5BA-4340-BFE5-07DA0ED49A27}"
"IconPath"=hex(2):25,00,73,00,79,00,73,00,74,00,65,00,6d,00,72,00,6f,00,6f,00,\
  74,00,25,00,5c,00,73,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,73,\
  00,63,00,61,00,76,00,65,00,6e,00,67,00,65,00,75,00,69,00,2e,00,64,00,6c,00,\
  6c,00,2c,00,30,00,00,00
"Description"=hex(2):40,00,25,00,73,00,79,00,73,00,74,00,65,00,6d,00,72,00,6f,\
  00,6f,00,74,00,25,00,5c,00,73,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,\
  5c,00,73,00,63,00,61,00,76,00,65,00,6e,00,67,00,65,00,75,00,69,00,2e,00,64,\
  00,6c,00,6c,00,2c,00,2d,00,31,00,30,00,30,00,33,00,00,00
"Display"=hex(2):40,00,25,00,73,00,79,00,73,00,74,00,65,00,6d,00,72,00,6f,00,\
  6f,00,74,00,25,00,5c,00,73,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,\
  00,73,00,63,00,61,00,76,00,65,00,6e,00,67,00,65,00,75,00,69,00,2e,00,64,00,\
  6c,00,6c,00,2c,00,2d,00,31,00,30,00,30,00,32,00,00,00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches\Upgrade Discarded Files]
@="{84e04a55-2d42-4909-86e3-62fd11483e8b}"
"IconPath"=hex(2):25,00,73,00,79,00,73,00,74,00,65,00,6d,00,72,00,6f,00,6f,00,\
  74,00,25,00,5c,00,73,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,73,\
  00,65,00,74,00,75,00,70,00,63,00,6c,00,6e,00,2e,00,64,00,6c,00,6c,00,2c,00,\
  30,00,00,00
"Description"=hex(2):40,00,25,00,73,00,79,00,73,00,74,00,65,00,6d,00,72,00,6f,\
  00,6f,00,74,00,25,00,5c,00,73,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,\
  5c,00,73,00,65,00,74,00,75,00,70,00,63,00,6c,00,6e,00,2e,00,64,00,6c,00,6c,\
  00,2c,00,2d,00,31,00,30,00,30,00,35,00,00,00
"SetupDirectories"="$WINDOWS.~Q;$INPLACE.~TR"
"Display"=hex(2):40,00,25,00,73,00,79,00,73,00,74,00,65,00,6d,00,72,00,6f,00,\
  6f,00,74,00,25,00,5c,00,73,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,\
  00,73,00,65,00,74,00,75,00,70,00,63,00,6c,00,6e,00,2e,00,64,00,6c,00,6c,00,\
  2c,00,2d,00,31,00,30,00,30,00,34,00,00,00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches\Windows Error Reporting Archive Files]
@="{C0E13E61-0CC6-11d1-BBB6-0060978B2AE6}"
"FileList"="*.*"
"Flags"=dword:0000007d
"Folder"=hex(2):25,00,55,00,53,00,45,00,52,00,50,00,52,00,4f,00,46,00,49,00,4c,\
  00,45,00,25,00,5c,00,41,00,70,00,70,00,44,00,61,00,74,00,61,00,5c,00,4c,00,\
  6f,00,63,00,61,00,6c,00,5c,00,4d,00,69,00,63,00,72,00,6f,00,73,00,6f,00,66,\
  00,74,00,5c,00,57,00,69,00,6e,00,64,00,6f,00,77,00,73,00,5c,00,57,00,45,00,\
  52,00,5c,00,52,00,65,00,70,00,6f,00,72,00,74,00,41,00,72,00,63,00,68,00,69,\
  00,76,00,65,00,00,00
"IconPath"=hex(2):25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,6f,00,6f,00,\
  74,00,25,00,5c,00,73,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,77,\
  00,65,00,72,00,2e,00,64,00,6c,00,6c,00,2c,00,30,00,00,00
"Display"=hex(2):40,00,25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,6f,00,\
  6f,00,74,00,25,00,5c,00,73,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,\
  00,77,00,65,00,72,00,2e,00,64,00,6c,00,6c,00,2c,00,2d,00,32,00,39,00,37,00,\
  00,00
"Description"=hex(2):40,00,25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,6f,\
  00,6f,00,74,00,25,00,5c,00,73,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,\
  5c,00,77,00,65,00,72,00,2e,00,64,00,6c,00,6c,00,2c,00,2d,00,32,00,39,00,38,\
  00,00,00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches\Windows Error Reporting Queue Files]
@="{C0E13E61-0CC6-11d1-BBB6-0060978B2AE6}"
"FileList"="*.*"
"Flags"=dword:0000007d
"Folder"=hex(2):25,00,55,00,53,00,45,00,52,00,50,00,52,00,4f,00,46,00,49,00,4c,\
  00,45,00,25,00,5c,00,41,00,70,00,70,00,44,00,61,00,74,00,61,00,5c,00,4c,00,\
  6f,00,63,00,61,00,6c,00,5c,00,4d,00,69,00,63,00,72,00,6f,00,73,00,6f,00,66,\
  00,74,00,5c,00,57,00,69,00,6e,00,64,00,6f,00,77,00,73,00,5c,00,57,00,45,00,\
  52,00,5c,00,52,00,65,00,70,00,6f,00,72,00,74,00,51,00,75,00,65,00,75,00,65,\
  00,00,00
"IconPath"=hex(2):25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,6f,00,6f,00,\
  74,00,25,00,5c,00,73,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,77,\
  00,65,00,72,00,2e,00,64,00,6c,00,6c,00,2c,00,30,00,00,00
"Display"=hex(2):40,00,25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,6f,00,\
  6f,00,74,00,25,00,5c,00,73,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,\
  00,77,00,65,00,72,00,2e,00,64,00,6c,00,6c,00,2c,00,2d,00,32,00,39,00,35,00,\
  00,00
"Description"=hex(2):40,00,25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,6f,\
  00,6f,00,74,00,25,00,5c,00,73,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,\
  5c,00,77,00,65,00,72,00,2e,00,64,00,6c,00,6c,00,2c,00,2d,00,32,00,39,00,36,\
  00,00,00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches\Windows Error Reporting System Archive Files]
@="{C0E13E61-0CC6-11d1-BBB6-0060978B2AE6}"
"FileList"="*.*"
"Flags"=dword:0000007d
"Folder"=hex(2):25,00,41,00,4c,00,4c,00,55,00,53,00,45,00,52,00,53,00,50,00,52,\
  00,4f,00,46,00,49,00,4c,00,45,00,25,00,5c,00,4d,00,69,00,63,00,72,00,6f,00,\
  73,00,6f,00,66,00,74,00,5c,00,57,00,69,00,6e,00,64,00,6f,00,77,00,73,00,5c,\
  00,57,00,45,00,52,00,5c,00,52,00,65,00,70,00,6f,00,72,00,74,00,41,00,72,00,\
  63,00,68,00,69,00,76,00,65,00,00,00
"IconPath"=hex(2):25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,6f,00,6f,00,\
  74,00,25,00,5c,00,73,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,77,\
  00,65,00,72,00,2e,00,64,00,6c,00,6c,00,2c,00,30,00,00,00
"Display"=hex(2):40,00,25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,6f,00,\
  6f,00,74,00,25,00,5c,00,73,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,\
  00,77,00,65,00,72,00,2e,00,64,00,6c,00,6c,00,2c,00,2d,00,33,00,30,00,31,00,\
  00,00
"Description"=hex(2):40,00,25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,6f,\
  00,6f,00,74,00,25,00,5c,00,73,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,\
  5c,00,77,00,65,00,72,00,2e,00,64,00,6c,00,6c,00,2c,00,2d,00,33,00,30,00,32,\
  00,00,00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches\Windows Error Reporting System Queue Files]
@="{C0E13E61-0CC6-11d1-BBB6-0060978B2AE6}"
"FileList"="*.*"
"Flags"=dword:0000007d
"Folder"=hex(2):25,00,41,00,4c,00,4c,00,55,00,53,00,45,00,52,00,53,00,50,00,52,\
  00,4f,00,46,00,49,00,4c,00,45,00,25,00,5c,00,4d,00,69,00,63,00,72,00,6f,00,\
  73,00,6f,00,66,00,74,00,5c,00,57,00,69,00,6e,00,64,00,6f,00,77,00,73,00,5c,\
  00,57,00,45,00,52,00,5c,00,52,00,65,00,70,00,6f,00,72,00,74,00,51,00,75,00,\
  65,00,75,00,65,00,00,00
"IconPath"=hex(2):25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,6f,00,6f,00,\
  74,00,25,00,5c,00,73,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,77,\
  00,65,00,72,00,2e,00,64,00,6c,00,6c,00,2c,00,30,00,00,00
"Display"=hex(2):40,00,25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,6f,00,\
  6f,00,74,00,25,00,5c,00,73,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,\
  00,77,00,65,00,72,00,2e,00,64,00,6c,00,6c,00,2c,00,2d,00,32,00,39,00,39,00,\
  00,00
"Description"=hex(2):40,00,25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,6f,\
  00,6f,00,74,00,25,00,5c,00,73,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,\
  5c,00,77,00,65,00,72,00,2e,00,64,00,6c,00,6c,00,2c,00,2d,00,33,00,30,00,30,\
  00,00,00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches\Windows Upgrade Log Files]
@="{84e04a55-2d42-4909-86e3-62fd11483e8b}"
"IconPath"=hex(2):25,00,73,00,79,00,73,00,74,00,65,00,6d,00,72,00,6f,00,6f,00,\
  74,00,25,00,5c,00,73,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,73,\
  00,65,00,74,00,75,00,70,00,63,00,6c,00,6e,00,2e,00,64,00,6c,00,6c,00,2c,00,\
  30,00,00,00
"Description"=hex(2):40,00,25,00,73,00,79,00,73,00,74,00,65,00,6d,00,72,00,6f,\
  00,6f,00,74,00,25,00,5c,00,73,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,\
  5c,00,73,00,65,00,74,00,75,00,70,00,63,00,6c,00,6e,00,2e,00,64,00,6c,00,6c,\
  00,2c,00,2d,00,31,00,30,00,30,00,37,00,00,00
"SetupDirectories"="Windows\\\\Panther"
"ValidIfUpgrade"=dword:00000001
"Display"=hex(2):40,00,25,00,73,00,79,00,73,00,74,00,65,00,6d,00,72,00,6f,00,\
  6f,00,74,00,25,00,5c,00,73,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,\
  00,73,00,65,00,74,00,75,00,70,00,63,00,6c,00,6e,00,2e,00,64,00,6c,00,6c,00,\
  2c,00,2d,00,31,00,30,00,30,00,36,00,00,00

Une fois le fichier configuré selon ses besoins, il suffira juste de créer un script contenant le fichier de registre et la commande sagerun

@echo off

regedit /s cleanmgr_1.reg

cleanmgr /sagerun:1

Posted in CMD, Shell, Windows, Windows 2000, Windows 7, Windows 8, Windows 8.1, Windows Serveur, Windows Serveur 2003, Windows Serveur 2008, Windows Serveur 2008 R2, Windows Serveur 2012, Windows Serveur 2012 R2, Windows Vista, Windows XP and tagged , , , by with comments disabled.