BinaryBrother Posted December 30, 2024 Posted December 30, 2024 (edited) I freelance in misc. computer repair. <snip> I wanted an open-source solution, or at least something I could use that wasn't illegal to use without a license, like TeamViewer. I found RustDesk and gave it a try, it's incredibly slow compared to TeamViewer (On my setup), but it'll get the job done. All it gave me for custom clients, was a PowerShell script that simply silent installed RustDesk and used my hosted server for the relay. I created a custom client in AutoIt and C# for the GUI (not included). So... Here it is. You'll notice some oddities in the temp path. This is only one part of a larger project that I'm working on, and it's slightly customized for my specific needs. _isInstalled() ; Tells whether it's installed. _GetLocalVersion() ; Retrieves the local version, if installed. _GetLatestVersion() ; Check github tags for latest version number. _Deploy_RustDesk() ; Auto pulls from current online version. _Run() ; Runs a program and returns console output. _Set_RustDesk_Password() _Get_RustDesk_ID() _Download() ; Quick and dirty download with progress. _DebugInit() ; Prepares log _Debug($pData) ; Console output & Debug log to desktop. _Error($pError) ; Handles all known errors. I am really busy with some stuff in my personal life. This UDF was crafted for me, without the intention of sharing it. It has variables at certain locations that need to be tailored to your needs. I even included my primary payload for my customers. ServiceWrapper.au3 WTS.au3 RD_Deploy.au3 Edited 13 hours ago by BinaryBrother Update Danyfirex, dmob, Trong and 1 other 3 1 SIGNATURE_0X800007D NOT FOUND
BinaryBrother Posted December 30, 2024 Author Posted December 30, 2024 It needs to be slightly modified to use the MSI, instead of the EXE installer. The MSI handles firing up the service, instead of having to do it manually. This UDF is close enough for you guys to modify and use. I won't be maintaining unless interest is expressed. SIGNATURE_0X800007D NOT FOUND
argumentum Posted December 30, 2024 Posted December 30, 2024 1 hour ago, BinaryBrother said: I won't be maintaining unless interest is expressed. Global $g_RustDesk_CallForSupportStr = "Please call (XXX)-XXX-XXXX for support!" Func _RustDesk_CallForSupportStr($sStr = Default) If $sStr <> Default Then $g_RustDesk_CallForSupportStr = $sStr Return $g_RustDesk_CallForSupportStr EndFunc ;==>_RustDesk_CallForSupportStr That is a better idea. Maybe go the extra mile and add a function just for that. Making a UDF is a pain. In my case because I can hear the complains in my head and change the UDF to appease those in my mind. Shut up already !, am typing ! 🤪 But those ideas don't come to mind beforehand. Only after some exposure is that they pop-up. In either case, if you maintain it, you'll be a better coder. Even if no one uses it, so, thanks for sharing and do keep it up. Follow the link to my code contribution ( and other things too ). FAQ - Please Read Before Posting.
BinaryBrother Posted January 1 Author Posted January 1 Yeah, I thought it was a pretty good foundation. I made a quick sc.exe "Service Control" wrapper, but if you use the MSI you don't need it. And yeah, I could definitely throw the repeated text into a variable. argumentum 1 SIGNATURE_0X800007D NOT FOUND
BinaryBrother Posted Thursday at 10:26 PM Author Posted Thursday at 10:26 PM (edited) I'm taking your advice, and maintaining, but I don't have the time to de-customize every aspect. Uploads on main post: Updated. Removed in-post static code. Edited Thursday at 10:27 PM by BinaryBrother argumentum 1 SIGNATURE_0X800007D NOT FOUND
Trong Posted Friday at 02:55 AM Posted Friday at 02:55 AM (edited) I created the relay server myself and installed RustDesk using the auto install script via ps. It seems your UDF is not detecting it. Edited Friday at 03:21 AM by Trong https://vnc.my/WindowsAgentAIOInstall.ps1 Regards,
BinaryBrother Posted Sunday at 06:56 PM Author Posted Sunday at 06:56 PM It's looking for a registry key to determine the local version, as per the PowerShell script provided, I used... Global $g_RustDesk_RegPath = "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\RustDesk" Global $g_RustDesk_RegKey = "Version" What value do you have at that location? SIGNATURE_0X800007D NOT FOUND
Solution BinaryBrother Posted 13 hours ago Author Solution Posted 13 hours ago (edited) I had a similar problem running the script under x86. Make sure you're running x64 through scite, or compile the scripts for x64 support. I'm gonna update the UDF one more time, I have to remove all my personal info so it'll take me a second. Edit: I shared my current working version in the first post. Just make sure you're running under an x64 atmosphere. You'll have to remove my personalizations, I don't have time right now but I still want to see you get this working. To be clear, this is dirty. You'll have to do some housekeeping. Also, you can try changing HKLM to HKLM64, if you're intent on running in an x86 environment. And Kudos to you for accurately describing your issue with screenshots. Final Edit: I did not account for using custom relays in this UDF. I only intended to Install/Update RustDesk and return the ID and Pass back to my server. And in my defense, the provided PowerShell script was horrid. Using sleeps to wait for services to start, etc. At least, my conversion actually checks for a running service, and attempts to start it if found or install it if it's missing. There's NO error checking in that PS script. Anywho... I've patched this together with a bottle of brandy and just got back from the ER over bronchitis. Ask me specifics and I'll try to detail things a bit better, but for now I'm just giving you what I have. Edited 11 hours ago by BinaryBrother Warnings SIGNATURE_0X800007D NOT FOUND
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now