Delete Files

From Wiki

Jump to:navigation, search

Script Language: .bat

Here is a simple script that will delete shortcuts. This script is very handy for getting rid of those unwanted desktop icons when you deploy an MSI. Just simply edit the path so it will suite your environment.

<vb> del "C:\documents and settings\all users\desktop\Microsoft Student with Encarta Premium 2008 DVD.lnk" /f </vb>

If you want to delete anymore shortcuts just simply add another line.

<vb> del "C:\documents and settings\all users\desktop\Encarta Dictionaries.lnk" /f del "C:\documents and settings\all users\desktop\Encarta Kids 2008.lnk" /f del "C:\documents and settings\all users\desktop\Microsoft Student with Encarta Premium 2008 DVD.lnk" /f </vb>

Please note if it is a link to the internet the extension will not be .lnk but .url instead, the following is an example:

<vb> del "C:\documents and settings\all users\desktop\edugeek.net.url" /f </vb>