Batch File Hangs After Opening MsAccess.exe

sambo

Registered User.
Local time
Today, 12:26
Joined
Aug 29, 2002
Messages
289
I open my database via batch file, but the batch file hangs at the final line (as if it is waiting for the MsAccess.exe line to complete)

It never makes it to the "quit" line, so the batch file continues to run infinitely (or until I shut it down manually)

Here are the final few lines of the batch file..

Code:
c:
cd\program files\microsoft office\office
Msaccess.exe "C:\InspectionDB\InspectionFe.mdb"
:end
quit

Any ideas on how to goto next line after opening InspectionFe.mdb?
 
I implement the exact same Access.exe call as is suggested on the previously mentioned site, but my DOS window still hangs.

It looks like the command window is just waiting for the MsAccess.exe line to finish running, but because the user is using the access app, the batch file doesn't go to the next line until the MsAccess app has been shut down.

Anyone??
 
Why don't you use a custom shortcut?

This goes in the Target: field of the shortcut...
"C:\Program Files\Microsoft Office\Office\msaccess.exe" "C:\InspectionDB\InspectionFe.mdb"

Use the Shell function if you are opening the db from another db.

HTH
 
The batch file does much more than simply opening the .mdb.
It also checks the network for new support documentation or new Front End Version.

I'll attatch a .txt version of the batch file.

Please advise..
 

Attachments

Looking at other's batch files it appears that you have the quit and end statments reversed. Don't know if that will solve your problem but it couldn't hurt to try.

Autoeng
 
FYI..

:end is not a "statement" it is a "tag". It is used only for "goto end" statements (of which I have none). Actually, the "quit" statement should be ambiguous in this instance as well, but I just put it in there for giggles.

The real problem is that the batch file never gets past the "MsAccess.exe ..." line because the MsAccess App continues to run, thus, the batch code never goes to the next line until the MsAccess App is closed (at which point the batch file finally ends).
 
I have not used a batch file since I got Windows XP and yes I do see your "hanging" problem. I do not think you can auto close DOS.

I suggest you use an Access db to do what you want. There is nothing in your batch file that you can not do with Access. You would also have more control using a db.

HTH
 
I understand where you are coming from, but it is just so much easier to have the users double-click the .bat Icon and away they go.

I'll probably just end up having a batch file call an intermediate db (or maybe just a vb app) that opens the working db.
 
not sure what ver of windows you are using...

do you end up with Finished-Revupdate on the task bar?

if so right click on that dos window and check off the

Close on Exit check box...

(do it from the dos window, not the properties in windows explorer)

btw, i generally use exit, but quit seems to work.


hth,
al
 
But doesn't that annoying "File Download" dialog open when your batch file executes? I'm trying to do a similar thing but I want the users to execute the .bat file by clicking a button on our intranet page. If I make the url for the button the path to the .bat file, it works but I can't get it to circumvent the "File Download" dialog. That dialog is avoided if I type the path in the browser address bar, however. So all I need to do is emulate the typing of the path in the address bar. Any ideas?


sambo said:
I understand where you are coming from, but it is just so much easier to have the users double-click the .bat Icon and away they go.

I'll probably just end up having a batch file call an intermediate db (or maybe just a vb app) that opens the working db.
 
I run the batch file directly from the Shared Network and I don't get the File Download Dialog. My users click from their Desktop, however, not from an HTML page. This is probably an Internet Browser setting more than it is a DOS Window setting. Do your users have to confirm that they are about to run a potentially harmful Application (batch file)? I'm not aware of any way around this little nuisance.
 

Users who are viewing this thread

Back
Top Bottom