publee / RdpKeeper

Windows service to keep RDP connections open
Apache License 2.0
2 stars 8 forks source link

rdpkeeped service does not starting #1

Open ghost opened 5 years ago

ghost commented 5 years ago

hi, i compilled source, all ok, i configured RdpKeeper.exe.config, run installservice.cmd as admin, service successfuly installed, but don't want to run, i tried manualy (error code 5 access denied), and i reboot PC, nothing, how to fix?

publee commented 5 years ago

Hi,

Please make sure domain, username and password are correct. Try to connect manually using the same credentials. What OS are you running it on / connecting to?

ghost commented 5 years ago

I tested on windows 7 and windows 10. Computer does not have domains. So I completed only hostname. Username and password

On Tue, 25 Jun 2019, 00:02 publee, notifications@github.com wrote:

Hi,

Please make sure domain, username and password are correct. Try to connect manually using the same credentials. What OS are you running it on / connecting to?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/publee/RdpKeeper/issues/1?email_source=notifications&email_token=AE4OOQLGUEKOC6AELWQGRWLP4EY4VA5CNFSM4H3A6BQ2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODYOG5II#issuecomment-505179809, or mute the thread https://github.com/notifications/unsubscribe-auth/AE4OOQKBCCXM2PGORTWHEL3P4EY4VANCNFSM4H3A6BQQ .

ghost commented 5 years ago

my compiled version https://mega.nz/#!jSAS1AwY!2RqwnME2UhbzVgWeJ_irRasXUxJIoNAjw9o0Uhedsi0 i completed only hostname field, username, and password! if you have already compiled and working version, please share link, best regards

publee commented 5 years ago

If I understand it correctly, then using windows remote desktop client you can connect to the machine specified in "hostname" by using "username" and "password". But the RdpKeeper service gives you "Access denied".

Please try to run RdpKeeper.Console with the same config file and post the output, it should look like this:

26.06.2019 0:20:08      Information     Host: upc User:\Lubo RDP Connection start DesktopWidth:1080 DesktopHeight:1920
connected to upc:3389
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@           WARNING: CERTIFICATE NAME MISMATCH!           @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
The hostname used for this connection (upc)
does not match the name given in the certificate:
Common Name (CN):
        UPC
A valid certificate for the wrong name should NOT be trusted!
26.06.2019 0:20:10      Information     Host: upc User:\Lubo RDP connection successful
Press any key to stop all connections
ghost commented 5 years ago

Please try to run RdpKeeper.Console with the same config file and post the output, it should look like this: lNLWpBWd7r 9ZWfxebuUI GmHHvJjtrh U6BU3hcWVK i received different output for running console, what's next?

If I understand it correctly, then using windows remote desktop client you can connect to the machine specified in "hostname" by using "username" and "password".

yes

But the RdpKeeper service gives you "Access denied".

i received "Access denied". when i want to enable manually rdpkeeper service!

publee commented 5 years ago

I created 1st release v1.0 from binaries on my computer, which is confirmed to work. Please try to download zip and run RdpKeeper.Console again.

ghost commented 5 years ago

Hi. Thanks a lot, after a few hours, I will check. Best regards

On Mon, 1 Jul 2019, 22:01 publee, notifications@github.com wrote:

I created 1st release v1.0 from binaries on my computer, which is confirmed to work. Please try to download zip and run RdpKeeper.Console again.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/publee/RdpKeeper/issues/1?email_source=notifications&email_token=AE4OOQK3WXBHYZBLF33G25DP5JICFA5CNFSM4H3A6BQ2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODY7BOEA#issuecomment-507385616, or mute the thread https://github.com/notifications/unsubscribe-auth/AE4OOQNMTPYS3Z5KVQTVIKTP5JICFANCNFSM4H3A6BQQ .

ghost commented 5 years ago

as i see from console, you use absolute path to .DLL, when i running rdp console, i give error that cannot find libfreerdp_utils, and path to this app, is absolute to your path from where folder stored. image when you compile and run software, on your PC can work perfectly, because path are valid, but in my case it's not working.

ghost commented 5 years ago

i can donate to receive functional solution! how it working your software (working principle)? on system level, this tool keep rdp connection active, locally?

publee commented 5 years ago

There are no absolute paths, I downloaded and extracted RdpKeeper.Console-1.0.zip on different computer with w10 64bit and it is working. I have no 32bit OS, so I cannot test. I use that succesfully on windows server at work to keep RDP session to localhost opened forever. No need to donate, I do my best to make it working. Prefered way is to run the service locally on automation server which will keep one or more RDP connections to localhost opened forever. But it should work properly also over network.

Based on the error message, looks like the problem is with 32/64 bits. Is your windows 64bit? Can you try to run it on 64bit os?

ghost commented 5 years ago

i tried on windows 10 x64, so as i understand, i need to run rdpkeeper console not from RDP, only from console mode? i can run it using psexec to run from another user remotely? what i do: i completing RdpKeeper.Console.exe.config with my local username and password that i logged in system when i runnin RdpKeeper.Console.exe , i was logged out. all correct? so, all working :+1:

But it should work properly also over network.

how to use it?

publee commented 5 years ago

RdpKeeper.Console.exe is just to test, if it works fine please try to install RdpKeeper.Service using same username/password/host

Over the netwok means that instead of using Hostname="localhost" specify compter name or IP address

publee commented 5 years ago

i can run it using psexec to run from another user remotely?

No need for psexec, the RdpKeeper.Console/RdpKeeper.Service can run under any account. Important is to have proper credentials in .config file

ghost commented 5 years ago

ok, i will try to install service later, thanks, best regards

ghost commented 5 years ago

hi, i tested on 2 different windows 7x64 real machine (console version) (same error in virtual enviroment) and server 2008, also, i tested in virtualbox same OS as on my personal PC (windows 10x64) on my real PC console work well, but in virtual enviroment, i cannot run it, i give error, like in previous screens. very strange, windows 7x64 error: image server 2008 error: TeamViewer_XKgpNcZlhC TeamViewer_dBbDgUJKqI

ghost commented 5 years ago

UPD: maybe need to compile using newest version of freerdp-sharp? like 1.1.0 ? https://www.nuget.org/packages/FreeRDP-Sharp.Native/ maybe old version of freerdp have some issues ?

publee commented 5 years ago

Hi, sorry for the delay, it's holiday season :)

System.Configuration.ConfigurationErrorsException means you have error in *.config file. I don't understand russian, but it is telling you the line number where you have a typo.

publee commented 5 years ago

For the error "Unable to load dll..." please try to copy all files from x64 subdirectory one leve up, next to the rdpkeeper executable and also delete all files from x86 subdirectory and copy all files from x64 to x86. This will cause to have freerdp x64 files in 3 places.