开发者

Execute windows program from SQL

Do you know how can I execute a Windows application from SQL server? I have written a Windows application (actually it is a EXE file), when it runs by double clicks, it can cal开发者_如何学Gol to Skype (I am working on Skype API). But when I try to execute it from inside SQL, it will never call to Skype.

I have used xp_cmdshell SP from SQL. I also tried to use this solution from CodeProject. But both of them did not work for me: http://www.codeproject.com/KB/database/xyprocedure.aspx

Any help is appriciated!

Thanks and regards, Leo


When you execute an external application through xp_cmdshell it will be run by the SQL Server Service account, on the Services desktop. Skype is probably running under your account on the interactive desktop. It's no way you can succeed with that approach. Services are not meant to directly interact with a client program that way.

Instead you have to create small program that runs on your desktop under your credentials. That program would regularly check some kind of work queue in the database. Each work item should contain the information that the small program needs to be able to interact with Skype.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜