EDN Admin
Well-known member
<p style="padding-right:0px; font-size:14px; vertical-align:baseline; clear:both; word-wrap:break-word; font-family:Arial,Liberation Sans,DejaVu Sans,sans-serif
Description of my scenario: I am using PsExec to remotely launch an in house utility which prints certain records on the command prompt. When this utility is launched on the command prompt by logging into the remote server, the utility works fine. It is able
to print all the records which is expected out of it. However, when the utility is launched remotely using Psexec , the utility hangs. Basically this is what we do to launch the exe remotely: i)Connect to the remote server as an <strong style="margin:0px; padding:0px; border:0px; vertical-align:baseline; background-color:transparent adminstrator using
psexec and open a remote cmd.exe psexec -u -p cmd.exe ii)Launch the utility from the remote cmd.exe
<p style="padding-right:0px; font-size:14px; vertical-align:baseline; clear:both; word-wrap:break-word; font-family:Arial,Liberation Sans,DejaVu Sans,sans-serif
Upon further investigation, it was found out that the utility makes use of an API called ReadConsoleInput(). (http://msdn.microsoft.com/en-us/library/windows/desktop/ms684961(v=vs.85).aspx) There is logic in the utility to print records on the command prompt
with a page size of 23 records and then waits for the user input.ReadConsoleInput() waits for an user input before the next page of records is displayed. This API does not return until at least one record is read from the Console input buffer. Since Psexec
does not redirect the keystrokes back to the remote server, the function waits indefinitely.This results in a hang.
<p style="padding-right:0px; font-size:14px; vertical-align:baseline; clear:both; word-wrap:break-word; font-family:Arial,Liberation Sans,DejaVu Sans,sans-serif
Is this a known issue? If yes, how do i get this scenario working? Any alternatives? Are there any documented workarounds?
<p style="padding-right:0px; font-size:14px; vertical-align:baseline; clear:both; word-wrap:break-word; font-family:Arial,Liberation Sans,DejaVu Sans,sans-serif
Any help would be very much appreciated.
<p style="padding-right:0px; font-size:14px; vertical-align:baseline; clear:both; word-wrap:break-word; font-family:Arial,Liberation Sans,DejaVu Sans,sans-serif
Thanks,
View the full article
Description of my scenario: I am using PsExec to remotely launch an in house utility which prints certain records on the command prompt. When this utility is launched on the command prompt by logging into the remote server, the utility works fine. It is able
to print all the records which is expected out of it. However, when the utility is launched remotely using Psexec , the utility hangs. Basically this is what we do to launch the exe remotely: i)Connect to the remote server as an <strong style="margin:0px; padding:0px; border:0px; vertical-align:baseline; background-color:transparent adminstrator using
psexec and open a remote cmd.exe psexec -u -p cmd.exe ii)Launch the utility from the remote cmd.exe
<p style="padding-right:0px; font-size:14px; vertical-align:baseline; clear:both; word-wrap:break-word; font-family:Arial,Liberation Sans,DejaVu Sans,sans-serif
Upon further investigation, it was found out that the utility makes use of an API called ReadConsoleInput(). (http://msdn.microsoft.com/en-us/library/windows/desktop/ms684961(v=vs.85).aspx) There is logic in the utility to print records on the command prompt
with a page size of 23 records and then waits for the user input.ReadConsoleInput() waits for an user input before the next page of records is displayed. This API does not return until at least one record is read from the Console input buffer. Since Psexec
does not redirect the keystrokes back to the remote server, the function waits indefinitely.This results in a hang.
<p style="padding-right:0px; font-size:14px; vertical-align:baseline; clear:both; word-wrap:break-word; font-family:Arial,Liberation Sans,DejaVu Sans,sans-serif
Is this a known issue? If yes, how do i get this scenario working? Any alternatives? Are there any documented workarounds?
<p style="padding-right:0px; font-size:14px; vertical-align:baseline; clear:both; word-wrap:break-word; font-family:Arial,Liberation Sans,DejaVu Sans,sans-serif
Any help would be very much appreciated.
<p style="padding-right:0px; font-size:14px; vertical-align:baseline; clear:both; word-wrap:break-word; font-family:Arial,Liberation Sans,DejaVu Sans,sans-serif
Thanks,
View the full article