#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2003
    Posts
    245
    Rep Power
    16

    How to delete the shortcut to a desktop and to a Program Menu Group.


    The code below, will add a shortcut to a desktop and to a Program Menu Group. How would I delete the shortcut to a desktop and to a Program Menu Group.

    Delete a shortcut from a desktop and from Program Menu Group

    Sub Create_Shortcut_On_The_Desktop()

    Dim lReturn As Long

    File_Name_And_Location = Directory_Box & "A_VPN.exe"

    'Add to Desktop
    lReturn = fCreateShellLink("..\..\Desktop", "A_VPN", File_Name_And_Location, "")

    'Add to Program Menu Group
    lReturn = fCreateShellLink("", "A_VPN", File_Name_And_Location, "")

    lReturn = fCreateShellLink("\Startup", "Shortcut to Web_Office_VPN", "c:\A_VPN\Web_Office_VPN.exe", "")

    End Sub
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Beginner (1000 - 1499 posts)

    Join Date
    Jul 2003
    Posts
    1,152
    Rep Power
    17
    U can delete the shortcut file on the desktop and the file or dirctory in program menu directory!..
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2003
    Posts
    245
    Rep Power
    16

    reply


    Hi cleverpig. I meant how to delete them using Visual Basic.
    Thank you for your help
  6. #4
  7. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2003
    Location
    Montreal, Canada
    Posts
    486
    Rep Power
    16
    you delete it the same way you would delete any others files. there is many way to do it. but I have a blank this morning, have been a long time since I used that, sorry ! might do a little search on how deleting file and you will find it easily I believe.
  8. #5
  9. No Profile Picture
    Contributing User
    Devshed Beginner (1000 - 1499 posts)

    Join Date
    Jul 2003
    Posts
    1,152
    Rep Power
    17
    U can use filesystem object to finish it!!To see tutorial on msdn:http://msdn.microsoft.com/library/de...stemobject.asp

IMN logo majestic logo threadwatch logo seochat tools logo