Run a program in the background
How can we make the program (a batch file for example) in the background or is not available on Windows? and is it going to be a process or service? the question we pose another question: how to make this service (bootable) automatically when Windows starts?
Re: Run a program in the background
1) Create a vbs script like this:
Code:
Dim oWsh, commands
Set oWsh = WScript.CreateObject ( "WScript.Shell")
command = "c:\file.bat"
oWsh.Run command, 0
you write this in a .vbs file and start trying to see what it gives.
The principle is that vb script allows you to execute an order without using the display option 0 (at the very end of the script).
2) you can use the startup script or logon scripts to start your script at startup.
Re: Run a program in the background
Thank you very much,
1) it is nice, but what is the concept of "background" in windows, and if so what are the commands that allow us to manage the process?
2) What are these startup scripts or logon, and is what put an executable file in C:\WINDOWS\system32\ for example implies that it will be run at startup next
Re: Run a program in the background
1) Well what do you mean by "background"? For me in the background it means that it run but nothing appears. This is not a special mode of operation, it's just a history display.
the script given in the link allows you to launch a .bat or any other command windows without this appears to execution.
2) scripts logon/boot can be configured for 2 place: either the group strategies if you are on an Active Directory domain with many items to manage, either on a particular local strategies. To start the editor of strategies, should be Start/Run/gpedit.msc
Against by putting your file in the system32 directory does not say that it will be executed at startup, this is not a good idea to save files in the personal directory windows anyway.