At work we have this software that monitors our door system, we want to run a script each time someone enters the office.

One thing it can do is play .wav files.

We would want to run a different script depending on who opens a door, therefore we would play a different .wav file per user.

How can I run a script per person who opens the door.

Potential solutions I have thought about:

  • Initially I thought maybe we could do something with midi that could trigger a script.

  • I have also considered the possibility of monitoring the wav files for file reads, then triggering a script.

The software is running on a Windows 7 VM, it would be great if we could eventually run a .bat or .exe file.

Am I crazy?

  • How do you start that software? Couldn't you just (like you proposed) call that software to play a WAV and call another script simultaneously? – slhck Mar 15 '17 at 16:46
  • You can try Autoit. autoitscript.com/site/autoit – dukasvili Mar 15 '17 at 16:48
  • @slhck The software itself triggers the .wav files not on the program start but at other points during runtime, but thats all it can do. I want to do something when the .wav file is played – Wez Mar 15 '17 at 16:49
  • Ahah. Then this is more of a programming challenge, where you want to programatically find out if something is making noise. stackoverflow.com/questions/6616227/… — I don't think there are any existing apps that do this. – slhck Mar 15 '17 at 16:52
  • 1
    I think I may be on to an XY problem! You're asking about your attempted solution rather than the actual problem. Now it's all a little more clear... It would help if you could give us a little more background, i.e., what is the software you're talking about, what kinds of WAVs does it play, what are the actions you need to perform etc. I know you want to keep your question concise and applicable to other problems, but a few details may help. – slhck Mar 15 '17 at 17:36

This is possible using a program called a binder. What a binder does is combines two files into one. For example if you have a wav file or image for that matter and you have an exe, a binder will combine them both to have a .wav / .jpg extension but when the new .wav / .jpg is launched, it will also launch the .exe file behind the scenes. One product I have used before is called Nbinder. There may be more out there now and I do know nbinder is not free, but it wasn't that much money.

So for your case, you would have to create the exe file (to do whatever you desire) and then you would bind it to a wav file.

Note: Since binders exist, this is the very reason why you never want to open an image or file of any type from an unknown source.

A source of using nbinder: https://www.youtube.com/watch?v=gaRa7Bips7Y

Another note: The way a binder works is much like a zip file. When you open the bound file, it unpacks the files to a temp folder, and then runs the file you chose to run at startup.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.