Question Remote Sever Automatic Program Start

Johnrg

Registered User.
Local time
Tomorrow, 04:40
Joined
Sep 25, 2008
Messages
115
One of our branches connects to the stock database on our server using a remote desktop connection.

I am trying to set this up so that when the connection is established the Access program automatically starts bypassing the servers destop and program shortcut.

There is an option to enter the path name for the file you want to start in the remote desktop options folder but when I do this I get an error message saying the file name and path are invalid.

Anyone had any experiance with remote desktop access and access databases that maybe able to help with this setup?

Thanks

JohnG
 
As a side note I can get it to automatically open a blank access file using the following path:

C:\Program Files\Microsoft Office\OFFICE11\MSAccess.exe

But I can't get it to open an actual database file using:

C:\Documents and Settings\JohnG\DatbaseFrontend\Stock.mdb

Any ideas?

Thanks

JohnG
 
Try this:
Code:
"C:\Program Files\Microsoft Office\OFFICE11\MSAccess.exe" "C:\Documents and Settings\JohnG\DatbaseFrontend\Stock.mdb"

Otherwise make a cmd or batch file with that line and run that.

The cmd file can also use the line

Code:
Start "C:\Documents and Settings\JohnG\DatbaseFrontend\Stock.mdb"
 
Thanks for the reply,

I tried the following this morning but still get an error message as attached below. I have double checked the path and all seems to be correct.

Code:
[COLOR=black]"C:\Program Files\Microsoft Office\OFFICE11\MSAccess.exe" "C:\DocumentsandSettings\Rotorua\MyDocuments\Database\DatabaseFrontEnd\Mactim.mdb"[/COLOR]

I have no idea what a cmd or batch file is, could you explain?
 

Attachments

  • Error.JPG
    Error.JPG
    28.5 KB · Views: 118
Don't separate the parts with quotes:


"C:\Program Files\Microsoft Office\OFFICE11\MSAccess.exe C:\DocumentsandSettings\Rotorua\MyDocuments\Database\DatabaseFrontEnd\Mactim.mdb"
 
Hi Bob,
Thanks for your reply.
Still no go using:

Code:
"C:\Program Files\Microsoft Office\OFFICE11\MSAccess.exe C:\Documents and Settings\Rotorua\MyDocuments\Database\DatabaseFrontEnd\MacTim.mdb"

Here is the error message - different one this time:

Its seems bizarre that I can get Access host to run but can't open a database file?

Any other ideas?
 

Attachments

  • Error2.JPG
    Error2.JPG
    86.9 KB · Views: 130
You're missing the SHELL part:
Code:
Shell "C:\Program Files\Microsoft Office\OFFICE11\MSAccess.exe C:\DocumentsandSettings\Rotorua\MyDocuments\Database\DatabaseFrontEnd\Mactim.mdb"
 
Hi Bob,

Sorry, I am new to this, so you saying that I type in exactly this into the connection area as attached photo:

Shell "C:\Program Files\Microsoft Office\OFFICE11\MSAccess.exe C:\Documents and Settings\Rotorua\MyDocuments\Database\DatabaseFrontEnd\Mactim.mdb"

If so, I still get an error message saying the system cannot find the specified file.

Thanks

JohnG
 

Attachments

  • Remote.jpg
    Remote.jpg
    95.6 KB · Views: 113
The pic cleared up a little confusion. I've not started a program through RDP like that,
 
Bob,
How do you open a Remote Access session?
Is there a better way to do this?
If not can anyone else help?
JohnG
 
Bob,
How do you open a Remote Access session?
Is there a better way to do this?
If not can anyone else help?
JohnG

I just open the RDP and then use a shortcut on the desktop to open the database.
 
A batch or command file is text file with a list of DOS commands.
They have extension .bat or .cmd

Just put the line in a text file and change its extension to bat or cmd.

A line with a program name will run the program.
Following the program by a file name will start the program and load the file to it.

The quote marks are necessary for the program and the file if they have spaces in the name. Leaving out the middle set will make one long string which won't work. They are two separate strings. The program and the file.

Another DOS command is START. Followed by a data filename it will run the program associated with that file type and load the file.

In either case the program's "start in" folder can be controlled by a line before the program line:
CD "C:\your start in path"

Old fogies like me learnt computers when DOS was all we had. It is frequently underestimated and treated as obsolete by young folk. I still use it sometimes in preference to VB for quick jobs because a single line of DOS can parse a file that would require over a dozen lines of VB.
 
Thanks guys,

Finally got it working using:

Code:
"C:\Program Files\Microsoft Office\OFFICE11\MSAccess.exe" "C:\Documents and Settings\Rotorua\My Documents\Database\DatabaseFrontEnd\Mactim.mdb"

Good thing about this method for databases is that when the file is closed the session is auto logged of. This means that inexperianced users can't (1) mess with other files on the server and (2) disconnect the full session by mistake which would throw all users out.

Good result all around!

JohnG
 
You can shorten the path by using Environment variables. They work in DOS but unfortunately not in shortcuts and unlikely in RDP.

The beauty of these is that the install can be different from standard locations (eg drive D) and still work.

The attached file will show them on your system.

Change the extension from txt to cmd and double click it.
 

Attachments

Users who are viewing this thread

Back
Top Bottom