Icon Identification

  • Thread starter Thread starter Jerry C
  • Start date Start date
J

Jerry C

I mail out two MDE databases. Test97 for Access 97 and
Test2000 for MS Access 2000 or MS Access XP.

The users have a MS Access icon on their desktops
pointing to their installed copy of Access.
How can I determine if their Icon points to Access 97 or
Access 2000 or Access XP?
My problem is:
If they open Test2000.mde with Access 97, they get a
Unrecogized database format error.
If they open Test97.mde with Access 2000, they get a
Can't Convert a MDE error.

I want to get their version of MS Access so I
can modify their desktop icon target to point to the
correct Test97.MDE or Test2000.MDE database.
 
Assuming only one version installed, this may work.

Dim WshShell
Set WshShell = WScript.CreateObject("WScript.Shell")

Select Case WshShell.RegRead("HKCR\.mdb\")
Case "Access.Application.8"
Msgbox "Access 97"
Case "Access.Application.9"
Msgbox "Access 2000"
Case "Access.Application.10"
Msgbox "Access XP"
Case "Access.Application.11"
Msgbox "Access 2003"
Case Else
Msgbox "Access not installed"
End Select
Set WshShell = Nothing
 
Back
Top