Scheduled tasks - DOS window

Solved
bubu -  
 Dude -
I created a scheduled task that launches a ".bat" file running an .exe software created under DOS.
Every 15 minutes, when the task starts, a DOS window appears on my screen, and it's bothering me...
How can I prevent this window from opening while still allowing the scheduled task to execute?
Thank you in advance.
Configuration: windows xp home

11 réponses

LeJoKeR
 
Coudont it really seems complicated for nothing your process, I have several scheduled tasks that run on my network and so that you don't see any command prompt windows opening you just have to run the task as another user. (When you go into the properties of the task you see "Run as", write "SYSTEM" in that place, you will never see a command prompt window appear and everything will work.)
13
JLC
 
Another possible solution: create a shortcut and modify the properties to start in a minimized window. Then the task should launch the shortcut (add .lnk after the shortcut name).
JLC
0
obelix
 
Simple and effective your "system"

thank you
0
Dude
 
super easy, a big thank you!
0
oxygen713
 
In general, I use a start /MIN filename
this launches the application associated with the file type with the filename as a parameter... to be tested with .bat files
6
bubu
 
Thank you aldo13 but I don’t know shellexecute.
Too bad!
3
bubu
 
thank you for your response, oxygen713
I feel like I’ve tried this method before and realized it didn’t work.
So I did this operation again and now it works.
You can’t imagine how much that helps me!!
Thanks a thousand times again
3
BeuD
 
pff you didn't even say the solution you found!!!!
0
bubu > BeuD
 
1000 excuses BeuD, but I thought that the previous message from oxygen was clear enough; here’s how I did it:
in the task scheduler, in the properties of the task in question, on the line "execute", I wrote: "cmd /c start /min c:\directory\task.bat"
"cmd" loads the command.com from DOS
"/c" tells command.com to execute the rest of the line and exit once the command is executed
"start /min" starts the window minimized to the icon, thus not interfering with the display currently on screen
"c:\directory\task.bat" is the program to be executed
0
Philou62 Posted messages 341 Registration date   Status Membre 19
 
Hi bubu,
Select a operating period. Normally, it should settle down...
See you,
Phil.
Inlèfe tin capio, here comes a Chti!
2
bubu
 
Hi Phil,
thank you for addressing my issue, but I can't find the "run time" anywhere, not even in the properties of the scheduled task.
And if I manage to find that parameter, what should I put? The task needs to run for the necessary time (it's targeted backups to DVD) and that's about 30 seconds; anyway, once the task is complete, everything goes back to normal.
What particularly bothers me is the command window opening right in the middle of my screen while I'm working on something else, so I have to keep minimizing that window to get it to the taskbar.
At the end of its execution, it disappears on its own.
What I want is for it to go directly to the taskbar and no longer annoy me by popping up in the middle of the screen.
I hope I'm being clear enough.
Thanks again

bubu (former ch'ti)
0
bubu
 
Doesn't anyone have any idea about my problem?
2
sabbri Posted messages 15 Status Membre 2
 
Hello,
how could I schedule my .bat file to run every day at 08:30 on Windows NT4

I tried this but it doesn't work

at 08:30 fich.bat

thank you
2
nounoussa
 
Hello Bubu, I have a problem that you have already solved before. I'm trying to figure out how to launch a .bat file that itself launches a .exe every 15 minutes.
How can I do this, and thank you.
Please detail your response.
2
bubu
 
Hello Nououssa,
I explained my entire method two messages before yours (message <12>)
If it's not clear enough, feel free to ask me questions.
0
bubu
 
Here, for me, it's well resolved by Lejoker's solution, namely:
to create a user who performs the scheduled task and works under another username.
the task will be carried out without anyone noticing.
thank you very much.
2
dreyau
 
Hello, I would like to send a message to the users on my network from a main server that at 3 PM, the file backup will begin. I know it can be done with net send, but I would like to schedule this task so I don’t have to write it every day.
Thank you in advance, it’s important and urgent please.
2
aldo13
 
Hi,

You can create a shortcut, and in the shortcut properties
you choose to run minimized.
1
bubu
 
Hi aldo13,
thank you for your response but...
it's a scheduled task, so I went into the Task Scheduler, right-clicked on the task in question, went to properties, clicked browse and selected the shortcut to the batch file in question (I made sure in the shortcut properties to set it to "minimized" for the window).
Once this file was selected, it displayed in the "run" properties window of the Task Scheduler, not the name of the shortcut but the name of the batch file itself; nothing changed during the execution of the task.
I then copied and pasted the name of the shortcut itself ("shortcut to xxx.bat.ink") into the "run" field (of the Task Scheduler properties); in this case, nothing executed.
The problem remains unsolved.
0
aldo13 > bubu
 
Hello,

So, apart from creating an executable that launches your executable, I don’t see anything else,
if you know a bit about programming, you can use
ShellExecute with SW_HIDE as the last parameter.
0