Solved

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

Posted on 2009-05-11
4
541 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Scraping specific data within an XML document 19 65
Copy dir and files with robocopy 2 72
Batch Files - Error Handling 4 46
BATCH to EXE Converter 2 67
When you receive another warning that your shared drive is almost full and you have asked your users to clean out old files again and again, here is a single command that may help. This command will place all the files that have not been used rec…
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…
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…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

762 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