.bat in the background
Solved
kimojo
Posted messages
402
Status
Membre
-
dca -
dca -
Hello,
I created a .bat that does some things :)
Then I created a scheduled task that runs this .bat every 2 minutes. Indeed, I need this .bat to be executed every 2 minutes.
However, every 2 minutes, a DOS window opens and closes in less than 1 second, which is quite unpleasant.
I would like to know if it is possible for this .bat to never show up.
Thank you
I created a .bat that does some things :)
Then I created a scheduled task that runs this .bat every 2 minutes. Indeed, I need this .bat to be executed every 2 minutes.
However, every 2 minutes, a DOS window opens and closes in less than 1 second, which is quite unpleasant.
I would like to know if it is possible for this .bat to never show up.
Thank you
Configuration: Windows XP Firefox 3.0.6
14 réponses
Under Windows XP, I found this, which hides the launched windows:
It's VBS, you need to save it in a file with the .VBS extension, then you can run it like an application. Replace what is underlined with your BAT file and place it in the same folder; otherwise, it seems to work by specifying an entire directory.
Dim shell, command
Set shell = WScript.CreateObject("WScript.Shell")
command="fstexe.exe"
shell.Run command, 0,true
WScript.quit
It's VBS, you need to save it in a file with the .VBS extension, then you can run it like an application. Replace what is underlined with your BAT file and place it in the same folder; otherwise, it seems to work by specifying an entire directory.
Dim shell, command
Set shell = WScript.CreateObject("WScript.Shell")
command="fstexe.exe"
shell.Run command, 0,true
WScript.quit
You need to use cmdow, check this link
http://ww1.win-web.be
--
People who say that Windows is shit and continue to use it make me laugh...
95% of errors come from what is between the keyboard and the chair.
http://ww1.win-web.be
--
People who say that Windows is shit and continue to use it make me laugh...
95% of errors come from what is between the keyboard and the chair.
Hello, create a shortcut in the same directory as the batch file, then go to the properties of the shortcut and in the Run option choose Minimized mode and confirm... reschedule the task using the new shortcut... from now on the window will no longer be visible except in the taskbar.
Thank you
I tested the Vbscript, it works perfectly just one question:
What is the purpose of the line: Dim shell, command
Whether it is present or not, the script works.
As for the shortcut, it doesn't work properly. Indeed, when I create my task and specify the shortcut, at the moment I browse and then click ok it agrees but when I look at the chosen path, it takes the script and not the shortcut.
Thank you
Thanks also to Dante even though I prefer the other solutions where I don't have to install anything.
I tested the Vbscript, it works perfectly just one question:
What is the purpose of the line: Dim shell, command
Whether it is present or not, the script works.
As for the shortcut, it doesn't work properly. Indeed, when I create my task and specify the shortcut, at the moment I browse and then click ok it agrees but when I look at the chosen path, it takes the script and not the shortcut.
Thank you
Thanks also to Dante even though I prefer the other solutions where I don't have to install anything.
What does that mean?
Starts a new window to run the given program or command.
START ["title"] path [/I] [/MIN] [/MAX] [SEPARATE]
| /NORMAL | /HIGH | /REALTIME | /ABOVENORMAL | /BELOWNORMAL
[/WAIT] [/B] [command/program]
...
B Starts the application without creating a new window.
Starts a new window to run the given program or command.
START ["title"] path [/I] [/MIN] [/MAX] [SEPARATE]
| /NORMAL | /HIGH | /REALTIME | /ABOVENORMAL | /BELOWNORMAL
[/WAIT] [/B] [command/program]
...
B Starts the application without creating a new window.
I have my .bat on my desktop.
If I put start /b at the beginning of the file and execute it, the window stays open.
In my opinion, this command allows not to open a new window but keeps the current one open.
If I put start /b at the beginning of the file and execute it, the window stays open.
In my opinion, this command allows not to open a new window but keeps the current one open.
No, still not.
Did you try it and does it work for you?
Like, create a .bat file on your desktop for example and put this in it:
start /b cd C:\Documents and Settings\
When you double-click on your .bat file on the desktop, doesn't the window open?
For me, this command is just meant to prevent a new window from opening when executing the command but keeps the current one open.
Did you try it and does it work for you?
Like, create a .bat file on your desktop for example and put this in it:
start /b cd C:\Documents and Settings\
When you double-click on your .bat file on the desktop, doesn't the window open?
For me, this command is just meant to prevent a new window from opening when executing the command but keeps the current one open.
if I want to run several .bat files in the background one after another, essentially chaining them, do I just need to declare other variables like command and shell?