in reply to Start a service, wait 10 seconds, and stop the service.

& is specific to unix shells. The Windows shell equivalent is start:

my $result = system("start C:\\Programme\\service.exe");

Unforunately, start doesn't return the process id, so it's not too useful to you. It might be useful to other readers of this thread, though.

Replies are listed 'Best First'.
Re^2: Start a service, wait 10 seconds, and stop the service.
by tphyahoo (Vicar) on Jun 17, 2005 at 17:12 UTC
    Indeed, thanks for clarifying that. Does no process id mean I can't stop the process without dying, as I would guess is the case?
      It means you can't stop the process (with or without dying). To kill a process, you need to kill it, and kill requires the PID of the process to kill. See my other reply for working (tested) solution to your problem.