.BAT Quetion - Close Window

crhodus

Registered User.
Local time
Today, 16:24
Joined
Mar 16, 2001
Messages
257
This isn't really a vb question, but I wasn't sure where to post it.

Is there a way to have the MSDOS window colose after the batch file has finished running? I've got a bat file that is opening an Access database. After the mdb file is open, I want the Dos window to go away.

I know a shortcut would work best, but I'm trying to email this batch file to a bunch of users so I don't have to go to each one of their computers. If I try to attach a shortcut to an email, the database that the shortcut points to get attached to the email.

Thanks,
crjunk
 
You need to send the short cut within a zip file. I also suggest that you create a self extracting file that will install the short cut onto the users computer.
 
How about putting exit on the last line of your batch file?? Or am i missing something here.
 
If I recall... that will on only work if the "Close on Exit" property is switched on the batch file and that setting does not 'stick' if you send the batch file to another user. But I think that is not a problem for Windows XP.
 
I tried adding EXIT to the .BAT file and it somewhat work. When I click on the .BAT file, it opens the database but the DOS window stays open. Once I close Access, the DOS window will also close.

I'm using Access 2000 and Windows 2000.
 
What about if you put a /B after the exit command?

What operating system are you using?
 
I tried adding /B to the exit command but it seems to have no effec. I'm using Windows 2000.

Thanks,
crhodus
 
I would suggest that you copy the FE down to the local computer and a shorcut to the FE placed on the users desktop. Once the bat file is finished running just have the users double click on that shortcut. You can also do a zip extract but it doenst work aswell because it wont use operating system variables. I hope this helps.
 

Users who are viewing this thread

Back
Top Bottom