Community FAQ
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
snigah
Engaged Sweeper II
Hello all

Does anybody know if it's possible to edit the registry on a remote client from the LS Actions?

I would be nice to enable/disable remotedesktop on demand.

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server]
"fDenyTSConnections"=dword:00000000

I hope that someone can help.

BR

Jannik
3 REPLIES 3
masterblaster
Engaged Sweeper II
Wow. Extremely useful! Thanks.
googoo
Engaged Sweeper III
works great, thanks for the script
FrankW
Engaged Sweeper III
I'm using a Command-Script for that, it enables/disables RDP on the remote-client.


@echo off

FOR /f "tokens=3 skip=2" %%i IN ('reg query "\\%1\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server" /v fDenyTSConnections') DO (set dword=%%i)

echo %DWORD%

if %DWORD%==0x0 goto OFF
goto ON

:ON
reg add "\\%1\HKLM\SYSTEM\CurrentControlSet\Control\Terminal Server" /f /v fDenyTSConnections /t REG_DWORD /d 0
echo.
echo RDP on host %1 activated
goto EOF


:OFF
reg add "\\%1\HKLM\SYSTEM\CurrentControlSet\Control\Terminal Server" /f /v fDenyTSConnections /t REG_DWORD /d 1
echo.
echo RDP on host %1 de-activated
goto EOF


:EOF
echo.
echo.
echo press any key
pause>NUL
exit


Just place it in the folder for the custom actions and create the custom action -> {actionpath}scriptname.cmd {computer}

Works perfect for me.

Greetz ...

Archive

This board contains archived posts from the retired Lansweeper Forum and Insiders Community.

New to Lansweeper?

Try Lansweeper For Free

Experience Lansweeper with your own data.
Sign up now for a 14-day free trial.

Try Now