in reply to Re^2: Win32::OLE and Wscript Shell -> Getting data back
in thread Win32::OLE and Wscript Shell -> Getting data back

Short googling for runas without password suggests psexec via ExpertSexChange, to which you can supply the username and password directly. Likely you can achieve the same using a Perl module, but I haven't had the need yet.

  • Comment on Re^3: Win32::OLE and Wscript Shell -> Getting data back

Replies are listed 'Best First'.
Re^4: Win32::OLE and Wscript Shell -> Getting data back
by Gaz5 (Novice) on Jun 14, 2010 at 12:54 UTC

    I did use google (extensively) and this site before posting. Give me some credit! :-)

    Despite a few weeks work of searching I haven't found a way do do via any other Perl module than Expect - which doesn't work on a Windows system due to IT::Tty being unavailable.

    In terms of psexec, it'll do exactly the same as my script, except mine doesn't need another exe bundled with it. The problem remains though: all I'll get back from it is that psexec completed with error code 0. I wont actually get the return code back from net send, which is my problem, not making the script run as someone else, that part works fine.