Re: cmd batch file question



Type taskkill /? in a command prompt. taskkill /im msaccess.exe

exit will close cmd.exe.

Exit quits the CMD.EXE program (command interpreter) or the current batch
script.

You did not crosspost, you multiposted!

[[If a message MUST be posted to multiple groups, post a single message and
select all the groups (or type their names manually, separated by commas) in
which you want it to be seen. This is called Crossposting and when used
properly it is *GOOD*.

This question was posted individually to multiple groups.

This is called Multiposting and it's *BAD*.

Replies made in one group will not be visible in the other groups, which
may cause multiple people to respond to a question with the same answer
because they didn't know someone else had already done it.

This is a waste of time. ]]
--
Hope this helps. Let us know.

Wes
MS-MVP Windows Shell/User

In Afz6g.881$KB.600@fed1read08">news:Afz6g.881$KB.600@fed1read08,
bonehead <sendmenospam@xxxxxxxxxxx> hunted and pecked:
Greetings,

Apologies in advance for the cross-posting. I'm not certain which is the
best group to post this to.

I don't use cmd.exe very much and I don't write batch files very often.
Hopefully this is a simple question with a simple answer.

Here is a batch job which I can run at will, or as a scheduled task. The
batch job starts MS Access, opens the specified file, and executes the
specified macro (which, in turn, invokes a VB function in a module):

"C:\Program Files\Microsoft Office\Office11\msaccess.exe"
"C:\MyFilePath\MyDatabaseName.mdb" /X MyMacroName
exit

Note that wrapping in certain newsreaders may make it appear that there
is a carriage return after the call to msaccess.exe, but this is not
actually the case. The only carriage return is before the exit command.

Can I modify this so that after the macro executes, the .mdb file
closes, MS Access exits, and the cmd shell closes? Currently I have to
close MS Access manually to return the focus to the shell, then the
shell performs the exit command and closes on it's own.

Suggestions?

.



Relevant Pages

  • Re: Looking for a program to run batch jobs to copy files
    ... folders and drag them to a destination, then add them to a batch list. ... you can open up multiple explorer windows ... Have you tried using xcopy command in a command shell? ...
    (microsoft.public.windowsxp.general)
  • Re: Escape, read events & loops
    ... buttons on the form are unclickable while the loop is running so I set escape on, test for inkeyand exit if the user presses escape.... ... I assume the batch is a pure foxpro processing, ... If some of the command buttons have cmd.Cancel set to .T., then it fires its click event if the user presses ESC. ...
    (microsoft.public.fox.programmer.exchange)
  • Closing program
    ... i created a small survey type program, i put an exit button at the end(of ... multiple forms) and used me.dispose as the command to end the program. ... does not end the program, rather, it closes the window and leaves the program ...
    (microsoft.public.vsnet.general)
  • Re: Most dependable way to run system commands
    ... Eventually I'd like to bring the execution of a few system commands ... specific execution issue (it dealt more with executing Perl code)). ... Unix and many similar systems, the exit status is an integer, with 0 ... variable after running a command via system or backticks. ...
    (perl.beginners)
  • Re: very slow cursor in CMD window w/Text editor?
    ... REM MS-DOS-based application, Windows runs COMMAND.COM. ... To run CMD.EXE, the Windows command prompt, ... The exit command is an internal command part of command.com or cmd.exe. ...
    (microsoft.public.windowsxp.general)