Solved

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

Posted on 2009-05-11
4
538 Views
Last Modified: 2012-05-06
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?
0
Comment
Question by:jgould763
  • 2
4 Comments
 
LVL 38

Expert Comment

by:Shift-3
ID: 24356045
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

0
 
LVL 7

Expert Comment

by:zwei
ID: 24356242

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

Open in new window

0
 
LVL 7

Accepted Solution

by:
zwei earned 500 total points
ID: 24356290
Of course you can add /F /Q to that if you want... and this needs to be put in a batch file (.bat).

/F force delete of readonly files
/Q does not ask "are you sure you want to delete?"

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

Open in new window

0
 
LVL 69

Expert Comment

by:Qlemo
ID: 24356299
For just the All Users profile, you can use this:

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

Featured Post

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Being a system administrator some time we require to do things remotely, one of them is installing software. Here I am going to tell you how to install software through wmic (Windows management instrument console). I am not at all saying that this i…
This article was inspired by a question here at Experts Exchange (http://www.experts-exchange.com/Software/Photos_Graphics/Images_and_Photos/Q_28629170.html). The requirements stated in that question are (1) reduce the file size of a large number of…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

815 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now