1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
|
' This WSH script deletes files in all users' temp folders
'======================
Dim WshSysEnv, WshShell, userprof, WSHFso, WshNetwork
Set WSHShell = WScript.CreateObject("WScript.Shell")
Set WSHFso = WScript.CreateObject("Scripting.FileSystemObject")
Set WshNetwork = WScript.CreateObject("WScript.Network")
Set objFSO = createobject("Scripting.filesystemobject")
Set WshSysEnv = WshShell.Environment("Process")
userprof = WshSysEnv("userprofile")
'SUPPRESSION DES FICHIERS INUTILES
Set oShell = CreateObject("Wscript.Shell")
'oShell.Run "%Comspec% /C RD /S /Q ""%USERPROFILE%\COOKIES"" ", 0, true
'On error resume next1
oShell.Run "%Comspec% /C RD /S /Q ""%USERPROFILE%\AppData\local settings\Tempor~1"" ", 0, True
On error resume next
oShell.Run "%Comspec% /C RD /S /Q ""c:\TEMP"" ", 0, True
On error resume next
oShell.Run "%Comspec% /C RD /S /Q ""%USERPROFILE%\AppData\local settings\Temp"" ", 0, True
On error resume next
'SUPPRIME LES FICHIERS IE TEMP'
oShell.Run "%Comspec% /C RD /S /Q ""%USERPROFILE%\AppData\local settings\Microsoft\Windows\Temporary Internet Files"" ", 0, True
On error resume next |
Partager