Icon Identification

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.
 
D

Dave Patrick

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top