Solved

Shell execute API vb.net Launch a program

Posted on 2013-10-25
4
550 Views
Last Modified: 2013-10-28
Does an anyone know if it is possible to run an Access database without specifying the location of MCAccess.exe if so what is the syntax?

(My users have MSAccess.exe in various places) I thought of putting the location of the exe in a text file on the client but this is a bit clumsy.
0
Comment
Question by:HKFuey
  • 2
4 Comments
 
LVL 20

Assisted Solution

by:CompProbSolv
CompProbSolv earned 150 total points
ID: 39601159
This should point you in the right direction:
http://support.microsoft.com/kb/317113

(From that link):
Dim oAccess As Access.Application

' Start a new instance of Access for Automation:
oAccess = New Access.ApplicationClass()

' Open a database in exclusive mode:
oAccess.OpenCurrentDatabase(filepath:="c:\mydb.mdb", Exclusive:=True)
0
 
LVL 74

Accepted Solution

by:
käµfm³d   👽 earned 350 total points
ID: 39601170
If the user has the corresponding Access database files registered to open with Access (by default they would), then you can simply specify the database filename to Process.Start. If the user has changed the default application for such files, then they will opened using that program.

e.g.

System.Diagnostics.Process.Start("C:\path\to\database\file.accdb")

Open in new window

0
 

Author Comment

by:HKFuey
ID: 39601249
Thanks, will try after the weekend! ; )
0
 

Author Closing Comment

by:HKFuey
ID: 39605573
Works great, thanks!
0

Featured Post

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Introduction As chip makers focus on adding processor cores over increasing clock speed, developers need to utilize the features of modern CPUs.  One of the ways we can do this is by implementing parallel algorithms in our software.   One recent…
Introduction During my participation as a VBScript contributor at Experts Exchange, one of the most common questions I come across is this: "I have a script that runs against only one computer. How can I make it run against a list of computers in …
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

757 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now