Re: How to start MS Access 2003 app from vb.net app

Tech-Archive recommends: Speed Up your PC by fixing your registry

From: moondaddy (moondaddy_at_nospam.com)
Date: 03/01/05


Date: Tue, 1 Mar 2005 17:53:20 -0600

Thanks Brian, but I'm not having good luck with this. Can you trouble shoot
why this isnt working?

When I call the shell cmd, I get a "File Not Found"
error. here's my code:

Dim ClientPath As String = Directory.GetCurrentDirectory & "\" &
System.Configuration.ConfigurationSettings.AppSettings("ClientName")
If File.Exists(ClientPath) Then
 'Code hits this line
    Console.WriteLine("exists")
Else
    Console.WriteLine("exists not")
End If
Dim ProcID As Integer
ProcID = Shell( ClientPath, AppWinStyle.NormalFocus)
'Also tried the line below
'ProcID = Shell("""" & ClientPath & """", AppWinStyle.NormalFocus)

Any ideas how I can get this running?

Thanks.

-- 
moondaddy@nospam.com
"Brian" <bcap@IHATESPAMclara.co.uk> wrote in message 
news:1109341516.81593.0@dyke.uk.clara.net...
> "moondaddy" <moondaddy@nospam.com> wrote in message
> news:%23BVbCgvGFHA.544@TK2MSFTNGP12.phx.gbl...
>> I have an MS Access 2003 application and now I want to be able to start 
>> it
>> up from a vb.net app.  Additionally, the vb.net application will be
>> validating the user, checking for updated versions of the Access app and
> if
>> there are new versions, will prompt the user to download a zipped copy of
>> the new version via a web service.  What I'm not sure about is how to
>> actually startup an instance of the Access app and once its open, close
> the
>> .net app.  And the really tricky part, is that I need to pass in a few
>> variables from the .net app once the access app is open and running.
> These
>> variables will be the computer name, name of person logged into the
>> computer, and name of the person logged into the application (via the 
>> .net
>> app).  I know it sounds overly complicated, but we have our reasons.  so
> in
>> summary, here's what I would like to know:
>>
>> 1) how to start ms access app from vb.net app
>> 2) how to pass in a few variable from the .net app to the Access app
>> 3) close the .net app and leave the Access app running (this part might 
>> be
> a
>> no-brainer, but I haven't tried it yet).
>>
>> Thanks.
>>
>> -- 
>> moondaddy@nospam.com
>>
>>
>
> Use the Shell command in VS.Net to run Access.  Specify Access command 
> line
> arguments as appropriate in the Shell command's "args" argument.  Use the
> /cmd argument in the Access command line to specify the values you want to
> pass in.  Use the Command function in Access to retrieve whatever was
> specified on the command line.  Have the .Net thingy close itself once 
> it's
> shelled Access.
>
> 


Relevant Pages

  • Re: How to build "Kiosk" application in vb.net
    ... I've set up a .Net app as a shell before, to test, and it worked fine. ... > What happens when I exit my app - will the pc shutdown or do I need to ...
    (microsoft.public.dotnet.languages.vb)
  • RE: Shell can open an application, can it close an app too?
    ... Shell cannot close the app. ... simplest way is probably to use SendKeys to send the proper command to close ... But SendKeys can be tricky since you ...
    (microsoft.public.excel.programming)
  • Re: custom shell starts before all services loaded
    ... I created a small app for my custom shell which then starts my main app, ... > Then you should look at WaitForInputIdle API. ...
    (microsoft.public.windowsxp.embedded)
  • Re: custom shell starts before all services loaded
    ... Shell to run the script file. ... > I created a small app for my custom shell which then starts my main app, ... because my main app comes up on the custom display. ... As far as WaitForInputIdle(), ...
    (microsoft.public.windowsxp.embedded)
  • Re: Application starts too soon
    ... each shell internal implementation. ... >>> The application runs froma a batch file. ... >>> shutdown command times out and the computer is ready to be turned off. ... >>> think the app tries to run, encounters an error, and exits. ...
    (microsoft.public.windowsxp.embedded)