Same BAT file behaving differently when called from Desktop or from within a Program

最后都变了- 提交于 2019-12-10 20:28:21

问题


I'm using Windows 7. I want to trigger a BAT file to run once some sound happens.

The BAT file should trigger a Skype call.

For that, I'm using the following BAT command:

c:\"Program Files"\Skype\Phone\skype /callto:someUsername

Skype should be already running before the trigger. If I double-click this BAT file on my desktop, it will run smoothly, pop up Skype, and start the call.

Now I'm using ISpy software to trigger the BAT file over a specified sound threshold.

ISpy is working fine. It detects the sound and triggers the BAT file. But when the BAT file starts running, instead of popping up Skype it tries to load a new Skype instance.

Is there a context difference between calling BAT file with double click or within ISpy?

How can I overcome this?


回答1:


@PaulojFonseca hasn't checked in since one day after this post, meaning Oct 29, 2012, so he won't likely come back to post his answer. Even though he won't be here to accept his own answer, I'll post it so at least it will show up. I've edited it to make the answer easier to read without much context.

"... when running ISpy, ... not all permissions [that were needed were] enabled. If i change this in the security preferences than the batch file runs smoothly."



来源:https://stackoverflow.com/questions/13112711/same-bat-file-behaving-differently-when-called-from-desktop-or-from-within-a-pro

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!