@echo off title CBAM-knop installeren set BASE=https://victorious-flower-0d34eb203.7.azurestaticapps.net set FOLDER=C:\CBAM_Knop echo. echo ============================================ echo De CBAM-knop wordt geinstalleerd... echo Even geduld, dit duurt een paar tellen. echo ============================================ echo. if not exist "%FOLDER%" mkdir "%FOLDER%" echo - Bestanden ophalen... powershell -NoProfile -Command "Invoke-WebRequest '%BASE%/CBAM_Knop.exe' -OutFile '%FOLDER%\CBAM_Knop.exe' -UseBasicParsing" >nul 2>&1 powershell -NoProfile -Command "Invoke-WebRequest '%BASE%/popup.ps1' -OutFile '%FOLDER%\popup.ps1' -UseBasicParsing" >nul 2>&1 powershell -NoProfile -Command "Invoke-WebRequest '%BASE%/updater.ps1' -OutFile '%FOLDER%\updater.ps1' -UseBasicParsing" >nul 2>&1 powershell -NoProfile -Command "Invoke-WebRequest '%BASE%/update_cbam.bat' -OutFile '%FOLDER%\update_cbam.bat' -UseBasicParsing" >nul 2>&1 if not exist "%FOLDER%\CBAM_Knop.exe" ( echo. echo Er ging iets mis met downloaden. Controleer je internet en probeer opnieuw. echo. timeout /t 8 >nul exit ) echo - Snelkoppeling maken... powershell -NoProfile -Command "$ws=$env:USERPROFILE+'\Desktop\CBAM Knop.lnk'; $s=(New-Object -COM WScript.Shell).CreateShortcut($ws); $s.TargetPath='C:\CBAM_Knop\CBAM_Knop.exe'; $s.WorkingDirectory='C:\CBAM_Knop'; $s.Save()" >nul 2>&1 echo - Automatisch opstarten instellen... powershell -NoProfile -Command "$sl=[Environment]::GetFolderPath('Startup')+'\CBAM Knop.lnk'; $sh=(New-Object -COM WScript.Shell).CreateShortcut($sl); $sh.TargetPath='C:\CBAM_Knop\CBAM_Knop.exe'; $sh.WorkingDirectory='C:\CBAM_Knop'; $sh.Save()" >nul 2>&1 powershell -NoProfile -Command "try { $a=New-ScheduledTaskAction -Execute 'C:\CBAM_Knop\CBAM_Knop.exe'; $t=New-ScheduledTaskTrigger -AtLogOn -User $env:USERNAME; $s=New-ScheduledTaskSettingsSet -ExecutionTimeLimit 0 -AllowStartIfOnBatteries -DontStopIfGoingOnBatteries -StartWhenAvailable; $p=New-ScheduledTaskPrincipal -UserId $env:USERNAME -LogonType Interactive -RunLevel Limited; Register-ScheduledTask -TaskName 'CBAM Knop Autostart' -Action $a -Trigger $t -Settings $s -Principal $p -Force | Out-Null } catch {}" >nul 2>&1 start "" "C:\CBAM_Knop\CBAM_Knop.exe" echo. echo ============================================ echo Klaar! De CBAM-knop is geinstalleerd. echo. echo Open AFAS Profit; de groene CBAM-knop echo verschijnt rechtsboven naast het venster. echo ============================================ echo. echo Dit venster sluit vanzelf... timeout /t 5 >nul exit