How-to Run Shell Program in Background

Is there a capability in the Windows-XP shell (command line interface) equivalent to the Linux (UNIX) shell capability of the "&" key? That is, which lets you start a command as a separate process to run in background while you go on with other commands?

I want to invoke a command line program automatically at startup that can keep running in background long after Windows finishes booting. It will assign itself a socket and behave as a Linux daemon. Putting its shortcut in the startup folder results in it starting -- I see the Cmd window flash on the screen -- and immediately terminating

Thanks for your attention.

--rlsj.
 
Elizabeth23: Thanks for your response.

I don't think the referenced article covers my problem, which has nothing to do with order of startup, as far as I can tell.

I have a program that is normally run in a command-line window. I want it to be automatically invoked at system boot. It opens a socket and waits for a TCP connection, which means its process must continue to exist in the background. If I put its shortcut in the Windows startup folder, a command window flashes on the screen at reboot -- meaning the program has started but immediately terminates. How can I keep it running in the background so that its process name will appear in the Task Manager display?

The referenced article seems to involve setting Registry keys. Where can I find information about their format, in particular how do I associate my program with any such key? And will a key that invokes the program at reboot keep it alive after it has proceeded to wait for a connection?

--rlsj
 
http://www.dslreports.com/forum/r20558361-XP-Pro-Run-a-program-in-background

this was one way, I have not used the start command but you may know how it works.

http://trayit.en.softonic.com/

above will create a system tray icon to keep it in the background, I have not used this program, but you can check it out, and read any reviews on it.

http://www.perlmonks.org/index.pl?node_id=409996

this may help also.

http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/ntcmds.mspx?mfr=true

command line help
 
Elizabeth23: Thanks for the pointer.

Putting this bat file into the Windows startup folder works:

d:
cd \
start /b c:\util\unison -socket 6996

But it's messy. It leaves a command window open on the screen. Anything done to close that window terminates the background unison process. I can minimize it, but that still takes up a slot on the Start Bar, as well as requiring a redundant action at boot.

I guess the short answer is that Windows-XP has nothing that quite matches the siimple Linux "&" command suffix. And yet many other programs seem able to run invisible processes in background after boot -- apparently just not those that must be started from the command-line.

Will anyone dispute that?

--rlsj
 
Back
Top