Page 1 of 1

How to avoid script running second instance of application

Posted: Mon Jan 02, 2012 11:56 pm
by Darwusch
For my webcam I use Active Webcam to host the webcam server.
It allows parameters to turn motion detection on or of, like from the command line:

Code: Select all

C:\Progra~2\Active~1\WebCam.exe /CAM_NO 2 /M_ON
This turns motion detection on for camera number 2.

Now I tried this with HS in three ways:
1) Event launching an application, with the above parameters.
2) Event launching a *.bat script with the command above
3) Event launching a *.vb script with the command above
They all start a second instance of the WebCam.exe, which is not what I want.
However, when I open a command prompt and run the code above, it does work.
Also when I stop homeseer as a service, and I start it as a program (not restarting the service), it also works correctly.
The HS service is run as the same user, so I don't understand this.
Can you help me out here?

Re: How to avoid script running second instance of application

Posted: Tue Jan 03, 2012 5:14 pm
by LostDreamer
Have you set the service to "Interact With Desktop" ?
This might be needed

Re: How to avoid script running second instance of application

Posted: Wed Jan 04, 2012 11:00 am
by Darwusch
I noticed that I didn't run HS as a service, but I set it as a sceduled task running as the admin user at system startup.
So I can not use the service settings. Running HS as a service is not recommended.
Problem stays the same.

Re: How to avoid script running second instance of application

Posted: Wed Jan 04, 2012 3:45 pm
by r_255
if i am correct there is a option some where in events that allows a event not to retrigger..

Re: How to avoid script running second instance of application

Posted: Wed Jan 04, 2012 5:19 pm
by Darwusch
There is, but it only has influence on the moment the task is run, which is at system startup. Ans then it simply ignors a second instance of that task.
It has no meaning for a later moment when I run the command.