1
votes

I have created an Access 2013 db that I need to deploy to several machines, some of which don't have Access installed on them. I can create a .ACCDE file from the .ACCDB file. But when I create a shortcut to the .ACCDE file using VBScript, the shortcut insists on setting the "Opens With" field to "MS Access". Since the .ACCDE file is an executable file, I need it to open directly, not to open up using Access. How can I get the VBScript to set this? Here's what I am using so far.

set objFileSys= CreateObject("Scripting.FileSystemObject")
Set oWS = WScript.CreateObject("WScript.Shell")
If objFileSys.FileExists(oWS.SpecialFolders("Desktop") + "\ClientData.lnk") Then
WScript.Quit
End If

Set oLink = oWS.CreateShortcut(oWS.SpecialFolders("Desktop") + "\ClientData.lnk")

oLink.TargetPath = "C:\Client Data\UnityClients.accde"
oLink.Description = "Client Data"
oLink.WorkingDirectory = "C:\Client Data"
oLink.WindowStyle = 3
oLink.IconLocation = "C:\Client Data\ufsLogo.ico"
REM oLink.OpensWith = ""
oLink.Save

I tried setting the "OpenWith" property, but that's not valid. :-(

1
This isn't really a shortcut problem. You can't open the ACCDE from Windows Explorer without MSACCESS.EXE installed --- either the full version or the runtime version.HansUp

1 Answers

1
votes

I think accde files run on machines without full blown Access still need the Access Run Time...https://www.microsoft.com/en-us/download/details.aspx?id=39358