.bat in the background
Solved
kimojo
Posted messages
402
Status
Member
-
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 answers
-
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 -
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. -
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 think that the line Dim shell, command is used to "declare the variables".
-
you start your .bat or your command with start /b
-
By using start /b, the console stays open all the time :)
-
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.
-
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. -
il faut faire start /b command
-
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. -
Send me your email and I'll send you a tool that can solve the problem right away ;)
-
Thank you, but it's for putting on a server later, so I don't really want to add more programs. The VBS is working very well, so I think I'll stick with that.
But thank you for suggesting :) -
Hello, try to create your .bat file and save it on the desktop as a vbs file. I don't think it will restart itself. Send your reply, see you++