Remove an xls files for all users on the network

Posted on 2014-07-14
Last Modified: 2014-07-14

I would like to know if i can remove an xls files for all users on the network? They all have a specific excel file in shortcut but i want to remove for all individual users desktop profile.

His that possible?

if the answer is yes, what would be the fastest way?

Thanks for your help
Question by:Wilder1626
    LVL 23

    Assisted Solution

    by:Thomas Grassi
    Are these computers all Windows 7?

    You would need access to the following folder C:\Users\Username\Desktop

    You could write a small batch file

    @echo off
    del "c:\users\joe smith\desktop\excel.lnk

    then use gpedit.msc  

    Put the batch file in the computer and user configuration sections  Windows Settings Scripts

    Put it in the Logoff and shutdown scripts

    Then when ever the user logs off or restarts computer the script will run.
    LVL 11

    Author Comment

    It is on a XP version and on a remote server. All users have access to the remote server.

    Would it still be the same process?
    LVL 2

    Assisted Solution

    by:Tyler Verkade
    The directory would be different. Instead of "C:\Users\Username\Desktop\", it would be "C:\Documents and Settings\Username\Desktop\". But removing the shortcut would only remove that specific link. The users could still access the file through their recently opened files list in Excel unless you actually move the location of the Excel document on the server.
    LVL 11

    Author Comment

    The direct folder is lock to all users now. so they wont access it.

    Let me try this and i will let you know shortly.
    LVL 52

    Accepted Solution

    If it's a domain, use group policy preferences. Those can delete shortcuts or files in general. The script mentioned is user specific, it cannot be deployed unless we use the variable %userprofile%\desktop.
    LVL 11

    Author Closing Comment

    Perfect all shortcut were removed.

    Thanks again for your help

    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    Join & Write a Comment

    Suggested Solutions

    Envision that you are chipping away at another e-business site with a team of pundit developers and designers. Everything seems, by all accounts, to be going easily.
    Is your computer hacked? learn how to detect and delete malware in your PC
    Here's a very brief overview of the methods PRTG Network Monitor ( offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…
    In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor ( If you're interested in additional methods for monitoring bandwidt…

    754 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

    17 Experts available now in Live!

    Get 1:1 Help Now