How to control a remote computer from Netcam Studio server - play a sound when motion is detected

Disclaimer: to do this you must have a little bit more knowledge how Windows works. Support on this guide is not included in the free or paid version of Netcam Studio. This is just to show the potential of both Netcam Studio and Windows.

When motion is detected on the NCS server a beep can be played on a remote computer running NCS windows client. The demand is that NCS client is running, but the sound level and type of sound cannot be controlled. Together with a user we found another way to handle this and the result was also how in a more general way it is possible to control a remote computer from NCS server.

Before you get into this read it all and be aware of that it will open ports and change security level of the remote computer.

The setup is described in the figure below with a local computer running NCS server with cameras. In this example we assume that it is of interest to monitor the cameras using NCS windows or web client and be acknowledged when motion detection occurs.
We will use a program called PsExec that is part of Microsoft system utilities. Using PsExec allows you to run commands on a remote computer.
Download and read more here There are many resources on the net about this and here is one of them
So here is a guide on how to do this.

On the remote computer (IP:

1.Change UAC – User Access Control

Normally all possibilities to run programs initiated by commands from another computer are blocked for security. That must be changed. Here is more info about UAC and how to allow for remote access
The result is

2.Firewall – allow for Remote Service Management

Remote Service Management is predefined in Windows Firewall. Go to Windows Firewall and click on Advanced Settings and then click on Inbound Rules. There are three inbound rules that must be allowed and it should look like this after they are enabled
After 1 and 2 the remote computer is prepared for access from the local computer.

On the local computer (IP:

The scenario is as follows. NCS is running on the local computer and when motion detection is generated from a camera it will play a sound on the remote computer. NCS windows client or web client do not have to be open.

1.Install PsExec in a folder on the Desktop named PSTools

2.Setup Rule Manager in NCS. When motion detection is generated by any camera the Rule manager looks like this
When motion is triggered by any camera NCS will take action and Run an App (or file) that is located C:\Users\Admin\Desktop\play_sound.cmd Use the complete path to the app or file.

3.Generate the file play_sound.cmd

Open Notepad and enter:

cd C:\Users\Admin\Desktop\PSTools\
psexec.exe -accepteula -u username -p password \\ "C:\Program Files\VideoLAN\VLC\vlc.exe" "C:\Users\Admin\Desktop\NCS_beep.mp3"

Save file as “play_sound.cmd” on the Desktop

Admin - is the user account on this computer. Change to what’s on your computer.

First we change directory to the folder PSTools where the program PsExec is located.

The part psexec.exe -accepteula -u username -p password \ executes psexec and login to the remote computer.

The part “C:\Program Files\VideoLAN\VLC\vlc.exe” “C:\Users\Admin\Desktop\NCS_beep.mp3” start the program VLC.exe and plays the file NCS-beep.mp3 located on the Desktop of the remote computer. Please observe that you must use absolute paths and also “….” around the paths.

On the remote computer (IP:

The file NCS_beep.mp3 is just a short melody that identify that a motion is detected on in this case any camera.

Test the system

On the local computer double click on the file play_sound.cmd. If everything is correct the sound in the file NCS_beep.mp3 should now play on the remote computer.

When that works enable the Rule in the Rule Manager and test when a camera generates a motion.

I have described in principle how one can use the program PsExec to execute a sound file on the remote computer. However, it can be any program and the command file can of cause do more than just this. Remember also that on the remote computer ports are opened and UAC is allowed from external computers. This makes the remote computer more vulnerable.

Have fun!