Hello everyone

I often need to connect to my company computer for work
So I have used chrome remote desktop and AnyDesk

Later on, I stopped using chrome remote desktop
Because there are often problems with connection... and the reason is unknown

However, if you leave directly after use, your computer will indeed become unlocked.
Of course, the chance of theft is very low
But

You should always pay attention to data security

But pressing windows + L in remote mode will change to lock your current computer 


So see this 2 articles

使用 Windows PowerShell 鎖定本機電腦 - iT 邦幫忙
https://ithelp.ithome.com.tw/articles/10029841

batch 指令筆記
https://blog.poychang.net/note-batch/

So, I added a new .cmd file to my desktop
Just run it when you leave

File name
LockWorkStation.cmd

content:

rundll32.exe user32.dll, LockWorkStation

yes~

It's just one line
So you can happily lock the desktop it ~
For your reference~