in reply to interactive command session possible?
This cannot be done by piping characters to runas.exe stdin, because it doesn't read them from stdin, but rather fetches them directly from the process input queue.
It can however be done by writing directly to the applications input queue, using Win32::GuiTest.
#! perl -slw use strict; use Win32::GuiTest qw[ SendKeys ]; system 1, q[ runas /user:UserName "c:\path\\to\\the\\Command /switches + Args" ]; sleep 1; SendKeys( 'tHePa55W0rD~', 50 );
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: interactive command session possible?
by lisa_lionheart (Initiate) on Sep 15, 2011 at 01:06 UTC | |
by BrowserUk (Patriarch) on Sep 15, 2011 at 01:22 UTC |