Link to home
Create AccountLog in
Avatar of jgould763
jgould763Flag for United States of America

asked on

How to delete a file from all Users Desktops through a script or Kaseya

I need a script to run that will delete a file from All Users Profiles desktops.

I would like to push this out through Kaseya but am open to other suggestions

DEL C:\Documents and Settings\HELP NEEDED HERE\Desktop\OrderForm.*

Any ideas?
Avatar of Shift-3
Shift-3
Flag of United States of America image

If you're putting it in a logon script then you can use this command:

DEL /F /Q "%userprofile%\Desktop\OrderForm.*"

Open in new window


for /d %%K in ("C:\Documents and Settings\*") do del "%%~fK\Desktop\OrderForm.*"

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of zwei
zwei
Flag of Sweden image

Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
See answer
Avatar of Qlemo
For just the All Users profile, you can use this:

del /f /q "%allusersprofile%\Desktop\OrderForm.*"