run exe in motion detection not working in version 0.3.9

Report and discuss bugs here!
Post Reply
david-v
Posts: 3
Joined: Wed Jan 02, 2013 12:04 pm

run exe in motion detection not working in version 0.3.9

Post by david-v »

Since I upgraded to version 0.3.9 I have problems with the run exe option in the motion detection action. In the previous version I could execute a command to lock my computer, but now, it seems that something is broken there. A command propmt window appears, the title of the command prompt shows the command to be executed but nothing happens. It looks as if execution is somehow blocked. I would like to see if this only happens on my system by using the older version 0.3.8 but I cant find that version here. Where can I download the older version?

edit: found version 0.3.8. I can confirm this is a bug in version 0.3.9. The older version has no problems and executes the command I specify.
z3r0c00l12
Moderator
Posts: 1210
Joined: Wed Jan 14, 2009 3:50 am

Post by z3r0c00l12 »

Can you post the command you are using here?
malun
Site Admin
Posts: 1589
Joined: Sun Jan 04, 2004 1:29 pm

Post by malun »

Confirmed! Version 0.3.9 will not run the .bat or .exe if there is a space in the path to the file.

This will not work:
C:\temp\folder with spaces\runme.bat
But this will work:
C:\temp\folder\runme.bat

I'll have a look at it...

/malun
malun
Site Admin
Posts: 1589
Joined: Sun Jan 04, 2004 1:29 pm

Post by malun »

Please try this new beta version:
http://www.yawcam.com/forum/viewtopic.php?t=3207

Let me know if it works for you :-)

/malun
david-v
Posts: 3
Joined: Wed Jan 02, 2013 12:04 pm

Post by david-v »

malun wrote:Please try this new beta version:
http://www.yawcam.com/forum/viewtopic.php?t=3207

Let me know if it works for you :-)

/malun
Thanks for the update. I installed this version. The command I execute is rundll32.exe user32.dll,LockWorkStation

This command works in 0.3.8 to lock the PC when I move away :D.

Without changing anything and after installing this version I get the error: Windows cannot find 'rundll32.exe user32.dll,LockWorkStation.' Make sure you typed the name correctly and type again.

Changing the command to
C:\Windows\System32\rundll32.exe user32.dll, LockWorkStation
does not help either. I tried double quotes as well. It wont run. But indeed, I get a different error than in version 0.3.9 :wink:

Let me know if you want me to try out a new version.

Thans in advance...
malun
Site Admin
Posts: 1589
Joined: Sun Jan 04, 2004 1:29 pm

Post by malun »

I'll have another look.
In the mean time, you could try to create a .bat file containing the commands:

Code: Select all

C:\Windows\System32\rundll32.exe user32.dll, LockWorkStation
exit
And then let Yawcam run the .bat file. That worked for me.

/malun
malun
Site Admin
Posts: 1589
Joined: Sun Jan 04, 2004 1:29 pm

Post by malun »

A new version to try out for you!
http://www.yawcam.com/beta/yawcam_BETA_2013-01-10.exe

I'm able to run

Code: Select all

rundll32.exe user32.dll, LockWorkStation
with this one.

Please give it a try :-)

/malun
RamjetR
Posts: 2
Joined: Sun Jan 13, 2013 12:22 am

Post by RamjetR »

Hi Malun

First time user/poster. Never knew about yawcam till yesterday when a friend told me about it. Great work and easy to use!

I've ran into a small problem interfacing it with EventGhost however? In relation to running an exe on motion detect with parameters.

EventGhost calls for the C:\xxxx\EventGhost.exe -event "insert event name here" command to be ran. For example,

Start>Run
C:\Program Files (x86)\EventGhost\EventGhost.exe -event yawcam

Will appear as an event perfectly when running directly from Run command prompt. I'm using your beta "http://www.yawcam.com/beta/yawcam_BETA_2013-01-10.exe" which was fixed to run parameters? When using the suggested syntax from your previous post with rundll32.exe and ran from the Run .exe setting in Yawcam I get the following error.

"Windows cannot find 'EventGhost.exe, -event yawcam'. Make sure you typed the name.... etc "

I've tried a variety of combinations and syntax and fail to make it work.

Running a .BAT works fine as you'd imagine, but I get a window cmd window pop-up with that and unfocus' the current window being used. It's not a show stopper for me, but is there something I'm doing wrong with the command to run an exe with parameters in Yawcam?

Thanks again.

Ramjet
david-v
Posts: 3
Joined: Wed Jan 02, 2013 12:04 pm

Post by david-v »

malun wrote:A new version to try out for you!
http://www.yawcam.com/beta/yawcam_BETA_2013-01-10.exe

I'm able to run

Code: Select all

rundll32.exe user32.dll, LockWorkStation
with this one.

Please give it a try :-)

/malun
Malun, this version fixes the problem :D

Thanks for your support and quick fix. Looking forward to next release version :wink:

David
malun
Site Admin
Posts: 1589
Joined: Sun Jan 04, 2004 1:29 pm

Post by malun »

@RamjetR:
The 2013-01-10 beta contained a fix regarding running .exe vs .bat files. But you are right, Yawcam doesn't handle the arguments passed to an .exe or .bat correct!
I've tried to fix that in this new beta:
http://www.yawcam.com/beta/yawcam_BETA_2013-01-19.exe
Please give it a try and see if you can get it to your EventGhost scripts!

/malun
RamjetR
Posts: 2
Joined: Sun Jan 13, 2013 12:22 am

Re: run exe in motion detection not working in version 0.3.9

Post by RamjetR »

Thankyou so much Malun!

This worked a treat! With motion detected running the exe "C:\Program Files (x86)\EventGhost\EventGhost.exe -event Yawcam.MotionDetected" in the yawcam box will display "Main.Yawcam.MotionDetected" in the event log of Evenghost :)

Very happy and can now use motion from the camera to not only send email alerts, but trigger external events such as turning on lights with an arduino, or turning on the TV to scare off burglars etc...

Thanks again Malun! :)
malun
Site Admin
Posts: 1589
Joined: Sun Jan 04, 2004 1:29 pm

Re: run exe in motion detection not working in version 0.3.9

Post by malun »

Nice to hear!
Happy triggering :-)

/malun
Post Reply