/build/static/layout/Breadcrumb_cap_w.png

Deleting Files

I have a Wise script that will look for and delete some shortcut files (.LNK).

I set a VAR that points to C:\documents and settings
I then search this location for any/all files that are called FileMaker*.lnk
If found delete them

This works and it will find the .LNK files on any/all users DESKTOP and delete it. But, it will "Not" find the .LNK file that is located here:

C:\Documents and Settings\%username%\Application Data\Microsoft\Internet Explorer\Quick Launch


I even have my script write each file it finds to a .TXT file and it this .TXT file will list all of the .LNK files it finds Except the file(s) located in this location.

I know the Quick Launch is a Hidden location but how do I make Wise Script see it and remove the files?

Thank you.

0 Comments   [ + ] Show comments

Answers (3)

Posted by: aogilmor 16 years ago
9th Degree Black Belt
0
try to variable-ize your path more.
Try using AppData or %userprofile% instead of c:\documents and settings\%username%
Posted by: mhsl808 16 years ago
Fifth Degree Brown Belt
0
Here is the issue. The .LNK file I am trying to delete is in this path
C:\Documents and Settings\%username%\Application Data\Microsoft\Internet Explorer\Quick Launch

And the same .LNK file will be there for any/all users of the machine. And since I don't know how many users will be on any given machine I can't un-hide and then re-hide the folder(s). I suppose I could with some WinBatch code but I was hoping Wise could do it for me. Also, this will get pushed out to workstations using a distribution tool (Not SMS) and this tool runs in the local System Account so when it runs it will not delete anything for the current logged on user.

Any hints would be great.
Posted by: anonymous_9363 16 years ago
Red Belt
0
Maybe it would be easier to handle this using Active Setup or an entry in the log-in script...
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ