Hottest Free Downloads - DownloadPipe.com Over 197,000 downloads! Bookmark Now!
DownloadPipe.com - New Downloads Every Minute
 SEARCH:
FAQFAQ    SearchSearch      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

Using Windows "scheduled tasks" to launch a .bat file

 
   Windows (Home) -> Security Admin RSS
Next:  Message Rule  
Author Message
Dave Calkins

External


Since: Feb 18, 2008
Posts: 2



(Msg. 1) Posted: Mon Feb 18, 2008 1:37 pm
Post subject: Using Windows "scheduled tasks" to launch a .bat file
Archived from groups: microsoft>public>windowsxp>security_admin (more info?)

I have a .bat file which I'd like to have run automatically every night.

I tried using Windows "scheduled tasks" and referenced the .bat file. I then
tried manually running it to test it. A command window briefly flashes on
the screen but the .bat file does not appear to be invoked.

I verified that the .bat file isn't getting called by creating a simple test
..bat file which did nothing more than create a file on disk. Sure enough the
..bat file isn't getting called. The test .bat file contents are shown below.


echo hello >> c:\test_log.txt


I also tried referencing cmd.exe /c "c:\test.bat" in the scheduled task and
this didn't work either.

The annoying part about all this is that I successfully did this a long time
ago and I recall having similar issues and eventually figuring it out If
only I could recall what the magic was which made it work.

Any ideas?


begin 666 smiley_smile.gif
M1TE&.#EA$ `0`/<``!X2`AX:#BX?"#HF`DHR`DXZ%EHZ`DY*/F%)'VI*$FU0
M'G91#W]4!V=6-VYA2W5K7GYV8H9:!I)?!89B&HIJ-J)J`JYU"JIV'(1[:L1^
M`H:">J:"0JJ:=LJ&"-N-`MZ2`L*.-L:2.M*6*NN9`NZB&^:J/N^M,LR<1MFI
M4LJJ=N:R7O*V2O*^8NK$?O+";O;*>9B4C*6AG*^LJ;:VLKZ^NMJZ@MK"EMK*
MJO;2DOK>KLK*QOKFPOKQW?[V[O___QX2`@``````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M`````````````````````"'Y! $``#X`+ `````0`! ```C:`'T('*B#!@T=
M`Q,.C &A`0($#2#(4"@0`P(&%U"@L, ``0:%&!* X,%C1PX<+CHD^"@0AH(3
M/4J>?,%B10<%, 0ZD$#R``<<+S84,$%"@@,?,EZ6Q)""9H@))$9D4" #QH(6
M-VP`K4G40X8/"V!8;?' `<T51$=4&# B; P%*&H$4($VZ@@"$3PHB$&C@847
M% 2(B.K!@( 1%AK0\ &!08D5%P0(& !@P8@1#" (G-% `@F[ER]+:#!C88,(
?'4*/Z!"A00R%,AQ<E""AHX.)%)%J>/! `^Z!`0$`.P``
`
end
Back to top
Login to vote
Dave Calkins

External


Since: Feb 18, 2008
Posts: 2



(Msg. 2) Posted: Tue Feb 19, 2008 12:33 am
Post subject: Re: Using Windows "scheduled tasks" to launch a .bat file [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

I found the problem. Someone else suggested using cmd.exe /k "the .bat
file" so that the window would stay open, allowing viewing of any errors.

As it turns out, the problem was caused by one of the directories in the
path to the .bat file containing spaces. Using dir /x to obtain the 8.3
abbreviated name and using that instead fixed the problem.


"Dave Calkins" <david.calkins.DeleteThis@noemail.noemail> wrote in message
news:%23lSue1lcIHA.748@TK2MSFTNGP04.phx.gbl...
>I have a .bat file which I'd like to have run automatically every night.
>
> I tried using Windows "scheduled tasks" and referenced the .bat file. I
> then tried manually running it to test it. A command window briefly
> flashes on the screen but the .bat file does not appear to be invoked.
>
> I verified that the .bat file isn't getting called by creating a simple
> test .bat file which did nothing more than create a file on disk. Sure
> enough the .bat file isn't getting called. The test .bat file contents are
> shown below.
>
>
> echo hello >> c:\test_log.txt
>
>
> I also tried referencing cmd.exe /c "c:\test.bat" in the scheduled task
> and this didn't work either.
>
> The annoying part about all this is that I successfully did this a long
> time ago and I recall having similar issues and eventually figuring it out
> If only I could recall what the magic was which made it work.
>
> Any ideas?
>
>
>
Back to top
Login to vote
Display posts from previous:   
Related Topics:
Scheduled Tasks - When setting up a scheduled tasks just as an antivirus scan, it requires the user name and password to run. The problem is that the password I set won't stay in there for it to run. The run as has the computer name followed by a / and then my user name....

Launch file properties from command line - Is there a way to automatically launch the file "Properties" dialog (The window dialog which appears when you right click on a file and select "Properties" in Windows Explorer) from the command line? I am looking around using explorer...

scheduled task - I would like to schedule for my temporary internet files and cookies to be deleted on a regular basis. I tried to go through scheduled task and could not find anything that looked like what I wanted. Can this be done? If so, how?

windows quick launch - hi, i've discovered that my quick launch-show desktop does not work. It brings up a browse o cancel screen that says it can try to find the file, but it never does.

Why is "Launch folder windows in a separate process" ignor.. - In Explorer Folder Options I have "Restore previous folder windows at logon" and "Launch folder windows in a separate process" enabled. But when I logon I have to close Explorer then re-open it to get two Explorer.exe process...
       Windows (Home) -> Security Admin All times are: Eastern Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You can edit your posts in this forum
You can delete your posts in this forum
You can vote in polls in this forum
Categories:
  Windows Forums
 Game Forums
 Linux Forums
 Mac Forums
 PDA Forums
 Mobile Forums
  Top  |  Store  |  RSS Feeds RSS  |  Data Feeds  |  Advertise  |  Submit  |  Bookmark  |  Newsletter  |  Contact