0

This is a bit general question.

I have a Windows application writted on VB (or whatever language) that has a login system. This app use computers registry to save and retrieve last login used, so the next time the user run the application it only needs to type his password. This works just fine.

Now one client wants to install my app in his server instead of clients computers and make all the pcs access the system via Remote desktop. No problem here.

My problem comes with the login system, because if i use the registry to save last login user, it will be only one (the server registry) so I always get last login user independet of wich pc access the system.

So my question is: How can I set a default user for each client PCs? I could use my database instead of the registry to save an retrieve last login user, but for then I'll need to know the PC name behind the remote desktop, and I don't know if thats even possible... Any ideas?

Thanks!

Note regardless duplicated post: My question is different from the above mention. I don't need to get user name from terminal server. I just need a way to save and retrieve some data on the registry for each terminal service user or client PC.

ericpap
  • 2,917
  • 5
  • 33
  • 52
  • possible duplicate of [Preferred way Of getting Client name From Terminal Server Session](http://stackoverflow.com/questions/5301079/preferred-way-of-getting-client-name-from-terminal-server-session) – Alex K. Apr 08 '15 at 13:45
  • Presumably each terminal user will have their own TS logon, you could use that – Alex K. Apr 08 '15 at 13:46
  • 1
    Do all users log into the terminal server with the same windows login? Probably not. – sloth Apr 08 '15 at 13:49
  • Thanks. No, every user will enter remote desktop with his own user and password, that are not the same as my system user and password. So reading your comments I suppose that i can change my code and use CurrentUser instead of LocalMachine key to save an retrieve last login name and the problem will be resolve. – ericpap Apr 08 '15 at 13:53
  • Also my question is different from the above mention. I don't need to get user name from terminal server. I just need a way to save some data on the registry for each terminal service user – ericpap Apr 08 '15 at 13:55

0 Answers0