Link to home
Start Free TrialLog in
Avatar of Peborgh
PeborghFlag for United Kingdom of Great Britain and Northern Ireland

asked on

Deleting start button menu links from VBA

The VBA code (within an Access app) I use  to delete  start button menu items/links to an application that has become redundant:

"
'    by this point I have found out which OS we are talking about in strOS...

    Select Case strOS
    Case "98"
         ''' MsgBox "found win9X os, so delete shortcut from %windir%\start menu"
         Kill "C:\windows\start menu\programs\Counselog ADMIN"
         Kill "C:\windows\start menu\programs\Counselog DATA"
         
    Case "Mi"
         ''' MsgBox "found WinME os"
         Kill "C:\windows\start menu\programs\Counselog ADMIN"
         Kill "C:\windows\start menu\programs\Counselog DATA"

    Case "XP"
         ''' MsgBox "found Win2k / XP os"
         Kill "C:\documents and settings\" & currentUser & "\start menu\programs\Counselog DATA"
         Kill "C:\documents and settings\" & currentUser & "\start menu\programs\Counselog ADMIN"
         
    Case Else
         MsgBox "found no compatible OS"
    End Select

"

... unfortunately this results in 'file not found' at least in the Win ME case. The path as far as I can decide is correct...

Any ideas?

Many thanks.
Avatar of cookre
cookre
Flag of United States of America image

Presuming that's the right path for ME and the files are there and deletable, I'd double check to make sure ME is being identified correctly.
Avatar of Peborgh

ASKER

It is. It's the frist thing I checked...

What's this about being deletable. This is ME and it has no security anyone would recognise.

Think on. Thanks.
ASKER CERTIFIED SOLUTION
Avatar of pratap_r
pratap_r
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Peborgh

ASKER

pratap,

I have just discovered this .lnk business for myself!

Tthanks anyway.