Jump to content

Delete links


Recommended Posts


First you have to know the path in which you want to delete files from. See the batch variable DEL_PATH

Second you need to know the name of the file. In my example I want to delete the quick launch link to PSPad. Its link name happens to be PSPad.lnk. See batch variable DEL_PROG

** NOTE **

If you wish to remove all links do not set DEL_PROG to *.* ... instead set it to *.lnk ... *.* will produce a Y/N prompt window (defeats purpose of unattended installing) cause of the Show Desktop quick launch.

** END NOTE **

Third combine the two within Quotes as seen below the batch comment DELETE LINE

@ECHO OFF

::DEL_PATH points to the directory where you want to delete files
SET DEL_PATH=C:\Documents and Settings\Schrys\Application Data\Microsoft\Internet Explorer\Quick Launch\

::DEL_PROG defines what the files name is
::         in this example I want to remove the PSPad Quick Lanuch link
SET DEL_PROG=PSPad.lnk

ECHO Deleleting file %DEL_PROG%
ECHO From the path %DEL_PATH%

::DELETE LINE
DEL "%DEL_PATH%%DEL_PROG%"

Hope this is what you were looking for

Link to comment
Share on other sites

That's not the point... What I meant was creating 2 user variables to delete a simple link, which can be neatly done in a single line of code, nothing to do with system created variables.

I mean, is it supposed to be even remotely funny or an I missing something? :thumbdown

Link to comment
Share on other sites

Thanks guys for your help.

Here is what i did and works great

@Jito463

Del /y "%AppData%\Microsoft\Internet Explorer\Quick Launch\PSPad.lnk"

Didn't works for me, btw del /y don't exist anymore i have ask del /? and not /y, so i take /a

I used this way,

DEL /a "C:\Documents and Settings\Irving\Application Data\Microsoft\Internet Explorer\Quick Launch\Tag&Rename.lnk"

That's all :)

Thanks again

Irving

Edited by Alpheratz13
Link to comment
Share on other sites

Morning,

@crahak

Thanks for your help but it's dont works :(

You think is right commande as %AppData% ??

It's work on your Unattend install?

In the mean time i use this :

DEL /a "C:\Documents and Settings\Irving\Application Data\Microsoft\Internet Explorer\Quick Launch\Tag&Rename.lnk"

That's works fine :)

Anyway, i am gladfull for yours help and thanks Jito463.

You two :thumbup

Irving

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...