Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

run batch minimized ?

31 views
Skip to first unread message

KB

unread,
Jul 31, 2002, 9:59:13 PM7/31/02
to
I made a batch program to run in task scheduler to backup some files a few
times a day, problem is when it runs it opens a cmd window and runs in a
window on top of everything else I have open.

How can make sure it runs minimized ?

Thanks

GuFaz

unread,
Aug 1, 2002, 2:41:58 AM8/1/02
to
If you have ticked the little box interactive in your scheduler, then try to
untick it.
There is no need for a batch file to run in an open window unless it has
something to show.
You can also try @ECHO OFF, or to redirect any outputs to null.

GuFaz

"KB" <tal...@yahoo.com> skrev i en meddelelse
news:RB029.122177$WsS....@news01.bloor.is.net.cable.rogers.com...

Ritchie Lawrence

unread,
Aug 1, 2002, 3:06:59 AM8/1/02
to
"KB" <tal...@yahoo.com> wrote in message news:RB029.122177$WsS....@news01.bloor.is.net.cable.rogers.com...

Add this line to the top of your batch. It should always run the batch minmized,
including from the commandline or double-clicking a shortcut. It also preserves
any commandline arguments, is stateless and allows the script to terminate as
usual:-

@set !=||(set !=1&start "%~dpnx0" /min cmd /c %0 %*&set !=&goto :eof)

I only wrote it this morning and therefore its never been used 'for real'. If you'd
rather play it safe, here's some links to previous threads:-

'Run Batch file minimized'
http://groups.google.com/groups?selm=fa516b59.02013...@posting.google.com

'DOS Batch file minimized'
http://groups.google.com/groups?selm=3bfd9fd9$0$8512$ed9e...@reading.news.pipex.net

'running NT login script minimized'
http://groups.google.com/groups?selm=achcgr$2b7h$1...@news3.infoave.net

HTH
--
Ritchie
set mail=%mail:do=%


Message has been deleted

KB

unread,
Aug 1, 2002, 1:26:34 PM8/1/02
to
Thanks for all the help !


"Ritchie Lawrence" <rlaw...@commanddoline.co.uk> wrote in message
news:3d48de9a$0$238$cc9e...@news.dial.pipex.com...

0 new messages