Task Scheduler with OBS

UbaIsTheName

New Member
Hi guys.
I'm having a problem with Task Scheduler of Windows.
Basically I created a script (batch) that will open OBS (and start recording) everytime I log on my PC and eveytime I unlock my account.
So I got two different situations.

The first situation (Logging on my PC):
OBS works fine, it opens in recording mode and when I Log off or lock the session I use taskill to end the process. I did this by adding a LogOnScript on Local Group Policy. So first situation is working.

The second situation (Unlocking my Windows session):
I got two tasks on Windows Task Scheduler. One script will open OBS (again, in recording mode) everytime there is a workstation unlock (as a specific user I defined) and the other will end the process when there is a workstation lock.
I run this tasks "whether the user is logged on or not", with "high privileges" with a configuration for "Windows 7, Windows Server 2008 R2".

This second situation is giving me a hard time. It opens the OBS in recording mode but it doesn't capture my desktop. Only black screen and i can't seem to find a way to overcome this issue.

Anyone wanna try to make a guess on how to solve this?
Thanks
 

koala

Active Member
I don't recommend answering this thread, because it's knowledge to install screen recording invisibly and automatically whenever any user logs on to record that user's activity without him knowing it.
 

UbaIsTheName

New Member
This is to be used to monitor external access to my company's server. We are currently working with another company and they requested access to our whole IT infrastructure. We already notified them that we'll record their remote sessions and they are ok with it.
But I understand that some people may use this for unethical purposes.
 

koala

Active Member
I don't see how this can be accomplished with OBS in a secure way. OBS runs within the session of the user being monitored, so he can just terminate OBS to avoid being monitored. Of course this is against your SLA, but a malicious user is able to cover his tracks this way.

By chance I work for an enterprise that is required to monitor and record remote admin access, and this enterprise is using a dedicated software suite for that: https://www.oneidentity.com/products/one-identity-safeguard-for-privileged-sessions/
I assume it is extraordinarily expensive (I'm just a monitored admin user, not the person that engineered the integration of that software), but such kind of software implements all kind of formal requirements on the transparency of remote admin usage. Just recording a session isn't sufficient at all. You have to manage all this, set up reporting, alerting, auditing. Done right, it is a bureaucratic monster where session recording is your smallest issue.
 

UbaIsTheName

New Member
We just need a very basic trivial way to record their session.
They agreed on the recording of their sessions, and we have event triggers that will message us every time they log in and out on our IT infrastructure. So if we have a 3 hour gap between events, we should expect a 3 hour video.

I agree with you on your opinion. This had to be something pretty much more organized and safe. Problem is that I'm "in charge" to come up with a "Free" solution to solve this issue.

I already talked with my senior and in the future we are going to subscribe to a paid software in order to do this operations in a more professional way (and I'll add oneidentity to the list by the way, thanks on the suggestion). Till then I'm stucked with this problem ...
 
Last edited:

koala

Active Member
Ah, a "free" solution is asked by your boss. No cost. Congratulations. I empathize with you. Doing something too cheap means paying twice.

It's the unlocking that makes trouble for you. Perhaps OBS is started too soon. I assume you use the unlock trigger in task scheduler to start OBS this time, and may be the trigger is too soon. May be the session with GPU access isn't restored the time the trigger fires. May be OBS is started too soon. I suggest you make a delay of 5-10 seconds before starting OBS. If you start OBS with a batch file, use the "timeout /t <seconds>" command.

Theres another detail. You wrote:
One script will open OBS (again, in recording mode) everytime there is a workstation unlock (as a specific user I defined)
As far as I know, OBS has to run in the context of the current user to grab his desktop. Running as specific (different) user means OBS gets its own session, not connected to the user session, with no access to his desktop contents. Configure the scheduler properties like in this post:
If you want the task start for every user, don't configure it for a specific user but for a group your remote admins are member of, for example the group Everyone, or Administrators, or some custom group you might have created for them.
 

UbaIsTheName

New Member
Hey @koala I'm sorry to answer this late.
Yeah, all bosses want to have the top tier activities with zero investment. I'm creating a list with some programs to implement in the future because, as you said, if the other company wants to stop our record all they have to do is close OBS, nothing more. But yeah, till that day comes, OBS will have to do.

I followed your instructions and it is still not working.
What I did found was that this seems to be a Remote Desktop Connection limitation.
Im testing this on 2 PC's.

Lets call PC1 -> Master
Lets call PC2 -> Slave

Slave
is the PC I want to record.


1st attempt (restarting Slave):
In order for OBS to work, I need to restart Slave.
Using Master --> After restart of Slave,
Script Runs (OBS recording) and it works perfectly.
I exit remote desktop, and OBS stops (taskill script OBS).


All the other sequential attempts:

Now, I log once again, via Remote Desktop Connection to Slave.
Script Runs (OBS recording) and it captures is a black screen.
I exit remote desktop, and OBS stops (taskill script OBS).


The only way I can make OBS to properly record the display is by restarting Slave.
There seems to be a variable that is not wiped when a user session is locked and that's whats making this issue.
Probably I need to find the registry that Remote Desktop Connection uses and flush them on lock screen, but I'm not sure though.



If instead of locking screen (exiting Remote Desktop) I sign out from user session (with remote desktop) then the OBS will continue to work.
So I may need to flush some registries to solve this hehe.
Got any thoughts on this issue?

Thanks and have a nice day.
 

koala

Active Member
I'm sorry, but I don't have any more info. I don't need this, and OBS only barely works on the virtual rdp GPU, so I didn't put work into researching.
 
Top