From 4c384dec040a2a9b98039f5664bfad03facfc04d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=88=9A=28noham=29=C2=B2?= <100566912+NohamR@users.noreply.github.com> Date: Sun, 10 May 2026 12:05:13 +0200 Subject: [PATCH] Add script to download and install paho DLL --- scripts/download-and-install.ps1 | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 scripts/download-and-install.ps1 diff --git a/scripts/download-and-install.ps1 b/scripts/download-and-install.ps1 new file mode 100644 index 0000000..12b201b --- /dev/null +++ b/scripts/download-and-install.ps1 @@ -0,0 +1,20 @@ +$DllUrl = "https://github.com/NohamR/RMHook-Win/releases/download/v1.0/paho-mqtt3as.dll" +$ScriptUrl = "https://raw.githubusercontent.com/NohamR/RMHook-Win/main/scripts/install-hook.ps1" + +$TempDir = [System.IO.Path]::GetTempPath() +$DestPath = Join-Path $TempDir "paho-mqtt3as.dll" +$InstallScriptPath = Join-Path $TempDir "install-hook.ps1" + +[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 + +Write-Host "Downloading DLL from $DllUrl to $DestPath..." +Invoke-WebRequest -Uri $DllUrl -OutFile $DestPath -UseBasicParsing + +Write-Host "Downloading install script..." +Invoke-WebRequest -Uri $ScriptUrl -OutFile $InstallScriptPath -UseBasicParsing + +Write-Host "Installing hook with downloaded DLL..." +# Run the downloaded script +& $InstallScriptPath -Action install -SourcePath $DestPath + +Write-Host "Done. You can safely close this window." \ No newline at end of file