EMP
EMP

Reputation: 62041

WTSOpenServer returns "access denied"

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.

Upvotes: 2

Views: 2170

Answers (1)

Remko
Remko

Reputation: 7340

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.

Upvotes: 4

Related Questions