[AccessD] A2K:OT: Get a batch file to quit or close

MartyConnelly martyconnelly at shaw.ca
Thu Aug 28 21:24:40 CDT 2003


Try this method; with call and start commands from batch, it works for 
me by  double clicking on the batch file from explorer. Should work from 
shortcut by calling trycompress.bat.

Create two batch files in notepad. The first runs the second, since the 
second batch file will be executed in a separate windows task, the first 
batch file can then move to the exit  command and close the cmd window, 
leaving the access mdb window open from the execution of the second 
batch. If you don't like the flickering windows there is a minimize 
check box on the short cut, along with the echo command. Don't make a 
recursive call otherwise you will blue screen quickly.

trycompress.bat
----------------------------------------------
"C:\Program Files\Microsoft Office\Office\MSACCESS.EXE"  "C:\xml\RSS 
xml.mdb" /compact
call  "C:\xml\tryaccess.bat"
Exit

--------------------------------------------
tryaccess.bat

start "C:\Program Files\Microsoft Office\Office\MSACCESS.EXE" 
"C:\xml\RSS xml.mdb"



Darren DICK wrote:

>Hey Drew
>I know bugger all about VB. Wouldn't know what to do
>Is there a close or quit cmd in DOS?
>
>Thanks heaps
>
>Darren
>
>
>
>----- Original Message ----- 
>From: "Drew Wutka" <DWUTKA at marlow.com>
>To: "'Access Developers discussion and problem solving'" <accessd at databaseadvisors.com>
>Sent: Friday, August 29, 2003 10:51 AM
>Subject: RE: [AccessD] A2K:OT: Get a batch file to quit or close
>
>
>  
>
>>The problem is that the batch file 'called' the app.  It isn't going to
>>close, until the app closes.  A simple way around this would be to have a
>>little VB .exe Shell out to the app, then close.  Then have your batch file
>>call your VB.exe, since it closes once it's run the shell command,
>>everything should close right away.
>>
>>Then again, if you are shelling out with VB, why would you need a batch
>>file! <grin>
>>
>>Drew
>>
>>-----Original Message-----
>>From: Darren DICK [mailto:d.dick at uws.edu.au]
>>Sent: Thursday, August 28, 2003 7:41 PM
>>To: AccessD List
>>Subject: [AccessD] A2K:OT: Get a batch file to quit or close
>>
>>
>>Hello all
>>I have a batch file that gets the latest server version of an app - copies
>>it locally then sparks it up
>>So far so good.
>>My problem is, I want the 'DOS' window to go away after it has sparked up
>>the app.
>>This is a Win2000 Serv Pack 4 box
>>I have tried the usual settings in the properties window both for the batch
>>file and the Shortcut.
>>Minimised the window changed the colours etc etc.
>>Can't find a switch to actually make it close after it loads the app or
>>'not' appear in the task bar
>>Anyone know of a DoCmd.Quit command for dos?
>>
>>Many thanks in advance
>>
>>Darren
>>
>>    
>>




More information about the AccessD mailing list