#RequireAdmin #Region ;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_Icon=..\..\Resources\Other\computer.ico #AutoIt3Wrapper_Compression=4 #AutoIt3Wrapper_UseUpx=y #AutoIt3Wrapper_Res_Comment=A RustDesk Custom Deployment #AutoIt3Wrapper_Res_Description=Installs RustDesk for WiseTech Solutions Support #AutoIt3Wrapper_Res_Fileversion=2.0.0.14 #AutoIt3Wrapper_Res_Fileversion_AutoIncrement=y #AutoIt3Wrapper_Res_ProductName=RustDesk Custom Deployment #AutoIt3Wrapper_Res_ProductVersion=1 #AutoIt3Wrapper_Res_CompanyName=WiseTech Solutions #AutoIt3Wrapper_Res_LegalTradeMarks=Proactive Solutions to Evolving Technology #AutoIt3Wrapper_Res_Language=1033 #AutoIt3Wrapper_Res_requestedExecutionLevel=requireAdministrator #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI **** #include "UDFs\WTS.au3" #include "UDFs\ServiceWrapper.au3" #Region ##### OPTIONS ##### Opt("MustDeclareVars", 1) Opt("TrayIconHide", 1) #EndRegion ##### OPTIONS ##### #Region ##### ENTRY POINT ##### _Debug(">> MainThread:: Initializing... <<") Local $sID Local $iTimer = 0 Local $iTimerTotal = 30 Local $sPassword = "123698745" If Not _isInstalled() Or $g_RustDesk_CurrentVersion <> $g_RustDesk_LatestVersion Then _Deploy_RustDesk() Else _Start_RustDesk() EndIf $sID = _Get_RustDesk_ID() _Set_RustDesk_Password($sPassword) _PrepareForGUI() _LaunchGUI() _Debug(">> MainThread:: Backend RustDesk Install Finished!") Func _PrepareForGUI() If FileExists($g_TempPath & "\UserID.txt") Then FileDelete($g_TempPath & "\UserID.txt") EndIf FileWrite($g_TempPath & "\UserID.txt", $sID) If FileExists($g_TempPath & "\RD_GUI.exe") Then FileDelete($g_TempPath & "\RD_GUI.exe") EndIf EndFunc ;==>_PrepareForGUI Func _LaunchGUI() _Download("https://WiseTechSolutions.net/Downloads/RD_GUI.exe", $g_TempPath & "\RD_GUI.exe", "WiseTech GUI...") ShellExecute($g_TempPath & "\RD_GUI.exe") EndFunc ;==>_LaunchGUI #EndRegion ##### ENTRY POINT #####