I am trying to execute a file, tried both a .bat file that kicks off the .exe and the .exe file that I want to run. I don't get an error, the results tab gives me a 1 and null and the messages tab says one row affected. But the file is never executed. I can do a directory of the c:\c folder, and create directories in that folder using xp_cmdshell so security on the folder should be ok. But the file is never executed. The executable writes a log file that is how I know it doesn't execute. Any ideas?
DECLARE @rc AS INT
DECLARE @sqlcmd AS VARCHAR(100)
SET @sqlcmd = 'c:\c\7.bat'
EXEC @rc = master.dbo.xp_cmdshell @sqlcmd