Drew Wutka
DWUTKA at marlow.com
Thu Aug 28 21:26:47 CDT 2003
That's not the point Darren. You do know VBA. If you have a msgbox open, and the next line is docmd.quit, is docmd.quit EVER going to happen if the message box is open? NO, because that line of code won't fire until it is reached. Same with a batch file. A batch file runs one line at a time, and it doesn't fire the next, until the first one finishes. If you have a line that opens a program, it is tied up until that program closes. As usual, you've forced me to do a little research, and as usual, I have a solution for you. While perusing through the batch commands in Windows Help (There aren't many), I looked into cmd, which opens another command window. From that, I found a reference to Start, which does EXACTLY what you want. There is a catch however. It is a Windows 2000 and up ONLY command. I tested this out. I have a few batch files that I use to make my life easier. One of my most common usages is setting up batch files to connect to a particular machine through Remote Administrator. Remote Admin accepts command line arguments, so I can specify the machine,and the update rate (which defaults to 100, but that bogs most client machines down. so I use the command lines to specify a refresh rate of 10). Now, when I use those short cuts, the command window stays open until I close the Remote Admin session. I can close the window manually, but just like what you are trying to do, it would be handy to have it close on it's own after firing the intended program. Sure enough, I just edited one of those batch files, and just put the word start in front of the line that calls the remote admin program....whalla, the command window closes on it's own, then Remote Administrator runs..... Go figure.... Drew -----Original Message----- From: Darren DICK [mailto:d.dick at uws.edu.au] Sent: Thursday, August 28, 2003 8:16 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] A2K:OT: Get a batch file to quit or close 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 > > _______________________________________________ > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > _______________________________________________ > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com _______________________________________________ AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com