Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how to close a DOS window

Status
Not open for further replies.

hellohello1

Technical User
Jun 30, 2006
110
US
I have Windows XP and Office 2003.

I created a batch file to open my Access database with the workgroup.

Here is my .bat file:
@echo off
"C:\Program Files\Microsoft Office\OFFICE11\MSACCESS.EXE" "\\nct3\Common\ManagementCenters\ProjectHealth\PADA\Test Databases\securityTest.mdb" /WRKGRP "\\nct3\Common\ManagementCenters\ProjectHealth\PADA\Test Databases\Security.mdw"
EXIT

Using my batch file works fine, but the DOS window stays open until Access closes.

I have tried changing the word EXIT to CLS at the end of the batch file above, but no luck. I tried renaming the file from .bat to .cmd, but still no luck.

How can I get the DOS window to go away after Access opens?

Thanks,
 
I found the answer! I have to add this line to the beginning:

Start " "

Here is my .bat file:

@echo off
Start " " "C:\Program Files\Microsoft Office\OFFICE11\MSACCESS.EXE" "\\nct3\Common\ManagementCenters\ProjectHealth\PADA\Test Databases\securityTest.mdb" /WRKGRP "\\nct3\Common\ManagementCenters\ProjectHealth\PADA\Test Databases\Security.mdw"

Thanks anway!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top