in reply to Installing a program on a remote server through a web browser.

How about detaching the spawned process by preceding the "psexec" command with "nohup ". You also need to direct output to a file, not just redirect standard error to standard out, otherwise it defaults to nohup.out.

update: and of course bracket the multiple shell commands to collectively nohup them -- oh and you don't need '\' to delimit them, which seems to have caused some fumbling around -- ";" will do.

One world, one people

  • Comment on Re: Installing a program on a remote server through a web browser.

Replies are listed 'Best First'.
Re^2: Installing a program on a remote server through a web browser.
by khangol (Novice) on Jan 03, 2011 at 17:22 UTC
    I am researching nohup (and how to do it) but if you have time, an explanation would be great. I also don't understand what you mean about the delimit part. are you talking about the
    $result =`psexec \\\\$host -u carynt\\rdcadmin -p 2backup! $racadm get +sysinfo 2>&1`;
    if I remove the extra '\' it doesn't work. thanks!
Re^2: Installing a program on a remote server through a web browser.
by khangol (Novice) on Jan 03, 2011 at 17:35 UTC
    nohup appears to be a unix command. I am running this script on a windows server (psexec is also a windows program). any way to do this on windows?

      khangol:

      For a windows box, I think you can use start instead of nohup.

      ...roboticus

      When your only tool is a hammer, all problems look like your thumb.

        I've preceded the start cmd and redirected the output to a file, but it doesn't seem to be returning any results.
        $result2 = `start psexec \\\\$host2 -u carynt\\rdcadmin -p 2ba +ckup! \\\\wisfs01\\sibar\\Packages\\OpenManage\\setup_sibar.bat 1> dr +ac_output.txt 2>&1`;