sulman.sqldba
Old Hand
Points: 391
More actions
April 18, 2016 at 9:52 am
#306645
EXEC XP_CMDSHELL 'net use /delete *'
Need to find out how to feed a "Y" answer into the execution of this command.
Trying to delete this post!
Phil Parkin
SSC Guru
Points: 247180
April 18, 2016 at 10:03 am
#1872810
sulman.sqldba (4/18/2016)EXEC XP_CMDSHELL 'net use /delete *'Need to find out how to feed a "Y" answer into the execution of this command.Trying to delete this post!
sulman.sqldba (4/18/2016)
Add a /y to the command line.
Steve Jones - SSC Editor
Points: 738663
April 18, 2016 at 10:08 am
#1872812
xp_cmdshell isn't interactive, so anything you run here would have to run without any additional input from the command line.
I have been able to automate things like http://ftp.exe by using an input file. Have commands in a text file that are sent to the exe with a < (input)
Ref: https://technet.microsoft.com/en-us/library/bb490982.aspx
Viewing 3 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply