m0nk3yza
asked on
Deleting desktop shotcuts after login script ran
Hi Guys,
I use Win XP Pro (SP 2).
When I log into my company's domain, the login script places approx. 15 shortcut icons on my desktop (which includes shortcuts to MS office, several network resources and even Windows Media player).
I never us any of these and it just clutters up my desktop.
The sysadmins can't remove this from the login script, as some employees use them.
Is it possible to place a script in the Start up Folder, which will run after the login script has executed, which will delete the icons from my desktop?
What would this "clean-up" script contain?
Thank you.
jo
I use Win XP Pro (SP 2).
When I log into my company's domain, the login script places approx. 15 shortcut icons on my desktop (which includes shortcuts to MS office, several network resources and even Windows Media player).
I never us any of these and it just clutters up my desktop.
The sysadmins can't remove this from the login script, as some employees use them.
Is it possible to place a script in the Start up Folder, which will run after the login script has executed, which will delete the icons from my desktop?
What would this "clean-up" script contain?
Thank you.
jo
write in Notepad the snippet and save it as .BAT or .CMD file.
Copy it onto your Start Up menu and that is all done.
Copy it onto your Start Up menu and that is all done.
@echo off
DEL /F "%USERPROFILE%\Desktop\office*.lnk"
DEL /F "%USERPROFILE%\Desktop\any other file.txt"
It should be possible to do so, or atleast you could put a registry string in your registry database, to startup with windows.
You should make a .bat script, with something like this:
Delete c:\documents and settings\[Your account]\Desktop\[filename ]
Then put in one line for each file.
Then go to start > run, and type regedit, and go to the following:
HKEY_LOCAL_MACHINE\SOFTWAR E\Microsof t\Windows\ CurrentVer sion\Run
Make a new key with the type "REG_SZ" and value should be the path to the .bat file you just made.
Hope that can help you, and will work for you.
You should make a .bat script, with something like this:
Delete c:\documents and settings\[Your account]\Desktop\[filename
Then put in one line for each file.
Then go to start > run, and type regedit, and go to the following:
HKEY_LOCAL_MACHINE\SOFTWAR
Make a new key with the type "REG_SZ" and value should be the path to the .bat file you just made.
Hope that can help you, and will work for you.
ASKER
Hi Guys,
Thanks for the response.
The login script seems to be executed after this .BAT file.
So the shortcuts are deleted, then recreated by the login script.
Any ideas on how to delay the execution on the .BAT file?
Thank you.
jo
Thanks for the response.
The login script seems to be executed after this .BAT file.
So the shortcuts are deleted, then recreated by the login script.
Any ideas on how to delay the execution on the .BAT file?
Thank you.
jo
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
@echo off
del "%userprofile%\desktop\Mic
del "%userprofile%\desktop\Som
del "%userprofile%\desktop\Som
And drop that into your startup folder. You'd need to make sure this got executed AFTER the logon script from your domain got executed (otherwise the icons wouldn't have arrived yet!). If it's always getting executed first... you can just put the file on your desktop and doubleclick it when your system has loaded.
Shortcuts on your desktop are just ".lnk" files, where the name of the file is the caption on the icon