in reply to Re^2: Perl with Net::SSH2, vshell and psexec
in thread Perl with Net::SSH2, vshell and psexec

What do you get when you run the command through ssh without a tty?
ssh $WINDOWS_HOST 'c:\psexec.exe /accepteula c:\psexec.exe /accepteula + \\localhost wmic OS get Caption'

psexec may be expecting a GUI environment, event if it doesn't seem to use it.

The issue may also be related to quoting. Windows SSH servers use different approaches to launch commands. Some run them through cmd.exe, others just call the function CreateProcess from the Win32 API, etc.

Replies are listed 'Best First'.
Re^4: Perl with Net::SSH2, vshell and psexec
by t_rex_joe (Sexton) on Feb 10, 2014 at 15:19 UTC
    Salva,

    Thanks for the response..

    Here's the output:

    PsExec v1.98 - Execute processes remotely Copyright (C) 2001-2010 Mark Russinovich Sysinternals - www.sysinternals.com c:\psexec.exe exited with error code 0.
    The caption portion does not appear..