• Jose,

    Pat is right. You will not see Calc started unless you are running SQL Server as a console application, because Calc is going to be a subprocess that has an interface and requires user interaction.

    xp_cmdshell is generally used to execute

    operating-system command. It is not designed to start applications which have a user interface.

    If you start an application like Calc which has a user

    interaction via xp_cmdshell, xp_cmdshell will start your application, pass the control to your application, and wait indefinitely until it ends. Since

    you cannot close such an application manually while it is running in background, xp_cmdshell will never regain control from your application. You may have to kill the corrrespoding process manually via Task Manager-->Processes tab to terminate the application and allow xp_cmdshell

    to get the control back.

    For more information, check out xp_cmdshell on BOL.

     

    Hope this helps.

     

    Haidong