INF: xp_cmdshell Does Not Retrieve User Input

ID: Q115184


The information in this article applies to:


SUMMARY

Programs that require user input should not be executed through the extended stored procedure xp_cmdshell. xp_cmdshell does not support running MS-DOS programs that require user input.


MORE INFORMATION

There is no way to get the user input from any DB-Library (DB-Lib) client utility to the server. xp_cmdshell was designed to suppress the console window on the server and not allow user input. It will run internal MS-DOS commands and 32-bit programs that require user input and return back to the client utility, but there is no way to provide user input back to the program. Running external MS-DOS commands that require this input will cause the DB-Library client to wait indefinitely for this input and never return control to the client. The SQL Server process will remain active and cannot be terminated using the kill command.

xp_cmdshell was not designed to allow user input to programs. To achieve this functionality, a new extended stored procedure can be written.

Additional query words: Windows NT


Keywords          : kbprg SSrvWinNT 
Version           : 4.2
Platform          : WINDOWS 
Issue type        : 

Last Reviewed: March 19, 1999