0
Set fso = New FileSystemObject
      If fso.GetFileName(txtPath + sname) = True Then
        Kill txtPath + sname
        MsgBox "File Deleted"
      End If

txtpath is the path to C:\Documents and Settings\All Users\Start Menu\Programs\Startup

where in startup i have an shortcut file
fso.getfilename doesnt find the shortcut file .

I want the method to find the shortcut file and delete it

Code for it Please

2
Contributors
1
Reply
2
Views
7 Years
Discussion Span
Last Post by AndreRet
0

As per attachment, this will put you on the right track.

You don't need the Windows Scripting Host or the System File Object.
And it doesn't mess with the registry.

Why add the dependencies or risk being flagged a Virus risk?

The download contains the Shortcuts and Special Folders module and it has a form for testing some of the module procedures.

The GetSpecialFolderPath function uses an Enum to make it easy to use.

I believe this will work on Win98 and up.

This module should be able to make shortcuts anywhere and has subs specifically for making them on the Desktop, in Programs Menu, and in Startup Menu

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.