views:

74

answers:

1

I'm trying to use the Remote Desktop API on a remote machine that I have Administrator rights on, however the WTSOpenServer call always returns error 5 ("Access denied"). I even tried calling WNetAddConnection2 to establish a session, which works fine (I can connect to IPC$ or C$) on the machine). I can also use the Remote Desktop client to actually start a terminal session to it.

The remote machine is running Windows XP Pro SP3 and I'm running Windows XP Pro x64 SP2.

+1  A: 

Check the value of HKLM\System\CurrentControlSet\Control\TerminalServer\AllowRemoteRPC, it is set to 0 by default on workstation OS and needs to be set to 1 for WTSOpenServer to work.

Remko
Yep, I've set it to 1 on the remote machine and it hasn't changed anything. I don't need to reboot the machine for it to take effect, do I?
Evgeny
It turns out that I *do* need to reboot, because I've already tried to access the machine before (found it on http://www.mombu.com/microsoft/windows-terminal-services/t-shadow-console-on-xp-pro-sp2-994408.html). It worked after a reboot - thanks!
Evgeny