I need a batch file to run hidden, or at least minimized. Another alternative is to run the batch file, and, have it closed while an operation continues. This is the code :

@echo off
echo "Updating Application to latest verion, takes a couple of seconds..."
if exist %USERPROFILE%\Documents (copy "\\servername\folder\WA.accdb" %USERPROFILE\Documents /y)
cd \
cd %USERPROFILE%\Documents

The 2nd to last line, opens the Access Database. Batch file's command prompt Windows only closes after user closes the Access database. Would like to either minimize the command prompt Window, or, exit the batch file while Access database is still running.


Try using the Start command.

Change the WA.accdb line to start WA.accdb

More info available from start /?:

Starts a separate window to run a specified program or command.

Maybe use Start's /B switch if needed:

B - Start application without creating a new window.


Give this a try. Replace:



start WA.accdb

  • What's the semicolon after exit supposed to do? – Ƭᴇcʜιᴇ007 Feb 27 '14 at 15:46
  • @techie007 | Nothing. The result will be the same I just use it from SQL habits. The main point was the above line. I can take it out if it bothers anyone. – Matthew Williams Feb 27 '14 at 15:49
  • Doesn't bother me. I figured it was a typo/habit from 'real' programming, but just in case it was something new in Batch I didn't know about I figured it was worth asking. :) – Ƭᴇcʜιᴇ007 Feb 27 '14 at 19:00
  • Actually, it's something old that you didn't know about. It's something old, idiosyncratic, largely undocumented, and not to be relied upon. – JdeBP Mar 1 '14 at 18:16
  • @JdeBP Just FYI, that link is malformed, but doesn't seem to work even if properly formed. Do you have an updated link? – RockPaperLizard Sep 30 '16 at 5:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.