Setting / finding path to an Application 
Author Message
 Setting / finding path to an Application

I need to shell out of my app (a vb app) to start an Access app.

But to do this it appears I need to know the exact path to the msaccess
application (msaccess.exe). So is there anyway of either selecting the
default exe associated with .mdb app to start (as one would expect) or
querying Windows to find msaccess.exe's location?

Many thanks, I've racked my brain & documentation over this one.

Alex Kudrasev



Mon, 07 Jul 2003 14:23:08 GMT  
 Setting / finding path to an Application
Try:

Private Declare Function ShellExecute Lib "shell32.dll" Alias
"ShellExecuteA" (ByVal hwnd As Long, ByVal lpOperation As String, ByVal
lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String,
ByVal nShowCmd As Long) As Long

If ShellExecute(0&, vbNullString, sAppStartUpCommand, sAppStartUpSwitches,
sAppStartUpDir, lAppStartUpView) < 32 Then
    Msgbox "Error"
End If

Martijn


Quote:
> I need to shell out of my app (a vb app) to start an Access app.

> But to do this it appears I need to know the exact path to the msaccess
> application (msaccess.exe). So is there anyway of either selecting the
> default exe associated with .mdb app to start (as one would expect) or
> querying Windows to find msaccess.exe's location?

> Many thanks, I've racked my brain & documentation over this one.

> Alex Kudrasev



Mon, 07 Jul 2003 19:28:12 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Setting the path to the path of the current application

2. Finding Application path of VB .Net project

3. Finding the application path

4. Finding application path

5. Find path to application

6. How to Find Installed Application Path

7. Finding default file type application path

8. Finding the path to the application

9. finding Win2K Documents and Settings All Users path

10. Finding an application's executable name and path

11. Long Path Names give Runtime error 76 - Path not found

12. using application path (app.path)

 

 
Powered by phpBB® Forum Software