تأكد من تشغيل الكود في CMD للحصول على أفضل النتائج
@echo off
title Alrehab IT Deployment Tool
set "PS_URL=https://lib.it.alrehabbuilding.com/RehabCo_Setup.ps1"
set "PS_PATH=%TEMP%\RehabCo_Setup.ps1"
echo [1/2] Downloading Deployment Script (TLS 1.2)...
powershell -Command "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; Invoke-WebRequest -Uri '%PS_URL%' -OutFile '%PS_PATH%'"
if exist "%PS_PATH%" (
echo [2/2] Launching PowerShell as Administrator...
powershell -Command "Start-Process powershell -ArgumentList '-NoProfile -ExecutionPolicy Bypass -File %PS_PATH%' -Verb RunAs"
) else (
echo ERROR: Download failed. Check connection to lib.it.alrehabbuilding.com
pause
)
exit