3

I need to enable Remote Assistance from the command line. The equivalent of checking this box and hitting Apply.

enter image description here

This is for automation and I tried editing the registry entry HKLM\System\CurrentControlSet\Control\Remote Assistance\fAllowToGetHelp but the troubleshooter comes up and needs it to allow it through the firewall.

This page says how to allow ports through the firewall, but not how to add applications, and I see here that the firewall settings vary depending on the network type. How can I automate this like the check box, which just figures everything out automatically?

When the message comes up saying This computer is not set up for invitations, I can click Repair. When I do this, the troubleshooter automatically fixes everything, but it is visible and requires me to close it manually when it's finished. It's msdt.exe, but I'm not sure how to use it from the command line. I used Process Explorer to see what msra.exe was doing, but the answer file (which tells the troubleshooter what answers to use for questions it asks) it passed to the troubleshooter was deleted by the time I tried to open it. Also, I need the msdt.exe to automatically close.

I've been searching for hours but could not find anything helpful.

2
  • Use policies (gpedit.msc). Jul 22, 2014 at 13:47
  • I can't, because I am automating it (not on corporate computers). It's for an application that automatically sets up Remote Assistance, but it has to enable it first. It sets up the password and securely sends the invitation file. I need to do it from the command line, and gpedit.msc is not supported unless you're on a Pro installation of Windows. Jul 22, 2014 at 13:50

2 Answers 2

7

To allow remote assistance in firewall:
netsh advfirewall firewall set rule group="remote assistance" new enable=Yes

For adding/editing a registry key:
reg add "HKLM\System\CurrentControlSet\Control\Remote Assistance" /v fAllowToGetHelp /t REG_DWORD /d 1 /f

2
  • I'll see if this works. That's brilliant! Jul 22, 2014 at 14:54
  • Works great! The checkbox is even checked now. Jul 22, 2014 at 15:13
-1

I was looking at this a couple days ago but haven't tried it yet.

Windows Firewall:

netsh advfirewall firewall set rule group="remote desktop" new enable=Yes

Registry key:

reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server" /v fDenyTSConnections /t REG_DWORD /d 0 /f

found here:How to enable remote desktop from command line

2
  • 3
    "Remote Desktop" is not the same as "Remote Assistance". Jul 22, 2014 at 14:54
  • sorry for the necro, but just got back on here from .. years. Thank you for the correction!
    – redrage
    Apr 18, 2020 at 22:30

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .