diff --git a/TGBeta.ps1 b/TGBeta.ps1 index cf0b2e6..a12b97e 100644 --- a/TGBeta.ps1 +++ b/TGBeta.ps1 @@ -994,7 +994,6 @@ function GetHtmlContent { } } - function triggerInstall() { const dropdown = document.getElementById('dattoRmmDropdown'); const UID = dropdown && dropdown.options[dropdown.selectedIndex] @@ -1007,15 +1006,14 @@ function GetHtmlContent { (async () => { // Priority 1: Install SVSMSP Module if (document.querySelector('input[name="installSVSMSPModule"]').checked) { - appendLog("Installing SVSMSP Module (Priority 1)...", "cyan"); - try { - await fetch('/installSVSMSPModule', { method: 'GET' }); - appendLog("SVSMSP Module installation completed.", "green"); - } catch (error) { - appendLog("Error installing SVSMS", "red"); - } - } - + appendLog("Installing SVSMSP Module (Priority 1)...", "cyan"); + try { + await fetch('/installSVSMSPModule', { method: 'GET' }); + appendLog("SVSMSP Module installation completed.", "green"); + } catch (error) { + appendLog("Error installing SVSMSP Module: " + error.message, "red"); + } + } // Priority 2: Install DattoRMM if (document.querySelector('input[name="installDattoRMM"]').checked) { @@ -1037,85 +1035,96 @@ function GetHtmlContent { }); appendLog("DattoRMM installation completed.", "green"); } catch (error) { - appendLog("Error installing DattoRMM: ${error.message}", "red"); + appendLog("Error installing DattoRMM: " + error.message, "red"); } } - // Priority 3: Other tasks if (document.querySelector('input[name="setSVSPowerplan"]').checked) { - appendLog("Setting SVS Powerplan (Priority 3)...", "cyan"); - try { - await fetch('/SetSVSPowerplan', { method: 'GET' }); - appendLog("SVS Powerplan set successfully.", "green"); - } catch (error) { - appendLog("Error setting SVS Powerplan: ${error.message}", "red"); - } - } + appendLog("Setting SVS Powerplan (Priority 3)...", "cyan"); + try { + await fetch('/SetSVSPowerplan', { method: 'GET' }); + appendLog("SVS Powerplan set successfully.", "green"); + } catch (error) { + appendLog("Error setting SVS Powerplan: " + error.message, "red"); + } + } - if (document.querySelector('input[name="installCyberQP"]').checked) { - appendLog("Installing CyberQP (Priority 3)...", "cyan"); - try { - await fetch('/installCyberQP', { method: 'GET' }); - appendLog("CyberQP installation completed.", "green"); - } catch (error) { - appendLog("Error installing CyberQP: ${error.message}", "red"); - } - } + if (document.querySelector('input[name="installCyberQP"]').checked) { + appendLog("Installing CyberQP (Priority 3)...", "cyan"); + try { + await fetch('/installCyberQP', { method: 'GET' }); + appendLog("CyberQP installation completed.", "green"); + } catch (error) { + appendLog("Error installing CyberQP: " + error.message, "red"); + } + } - if (document.querySelector('input[name="installSplashtop"]').checked) { - appendLog("Installing Splashtop (Priority 3)...", "cyan"); - try { - await fetch('/installSplashtop', { method: 'GET' }); - appendLog("Splashtop installation completed.", "green"); - } catch (error) { - appendLog("Error installing Splashtop: ${error.message}", "red"); - } - } + if (document.querySelector('input[name="installSplashtop"]').checked) { + appendLog("Installing Splashtop (Priority 3)...", "cyan"); + try { + await fetch('/installSplashtop', { method: 'GET' }); + appendLog("Splashtop installation completed.", "green"); + } catch (error) { + appendLog("Error installing Splashtop: " + error.message, "red"); + } + } - if (document.querySelector('input[name="installSVSHelpDesk"]').checked) { - appendLog("Installing SVS HelpDesk (Priority 3)...", "cyan"); - try { - await fetch('/installSVSHelpDesk', { method: 'GET' }); - appendLog("SVS HelpDesk installation completed.", "green"); - } catch (error) { - appendLog("Error installing SVS HelpDesk: ${error.message}", "red"); - } - } + if (document.querySelector('input[name="installSVSHelpDesk"]').checked) { + appendLog("Installing SVS HelpDesk (Priority 3)...", "cyan"); + try { + await fetch('/installSVSHelpDesk', { method: 'GET' }); + appendLog("SVS HelpDesk installation completed.", "green"); + } catch (error) { + appendLog("Error installing SVS HelpDesk: " + error.message, "red"); + } + } - if (document.querySelector('input[name="installSVSWatchtower"]').checked) { - appendLog("Installing SVS Watchtower (Priority 3)...", "cyan"); - try { - await fetch('/installSVSWatchtower', { method: 'GET' }); - appendLog("SVS Watchtower installation completed.", "green"); - } catch (error) { - appendLog("Error installing SVS Watchtower: ${error.message}", "red"); - } - } + if (document.querySelector('input[name="installSVSWatchtower"]').checked) { + appendLog("Installing SVS Watchtower (Priority 3)...", "cyan"); + try { + await fetch('/installSVSWatchtower', { method: 'GET' }); + appendLog("SVS Watchtower installation completed.", "green"); + } catch (error) { + appendLog("Error installing SVS Watchtower: " + error.message, "red"); + } + } - if (document.querySelector('input[name="installThreatLocker"]').checked) { - appendLog("Installing ThreatLocker (Priority 3)...", "cyan"); - try { - await fetch('/installThreatLocker', { method: 'GET' }); - appendLog("ThreatLocker installation completed.", "green"); - } catch (error) { - appendLog("Error installing ThreatLocker: ${error.message}", "red"); - } - } + if (document.querySelector('input[name="installThreatLocker"]').checked) { + appendLog("Installing ThreatLocker (Priority 3)...", "cyan"); + try { + await fetch('/installThreatLocker', { method: 'GET' }); + appendLog("ThreatLocker installation completed.", "green"); + } catch (error) { + appendLog("Error installing ThreatLocker: " + error.message, "red"); + } + } - if (document.querySelector('input[name="installRocketCyber"]').checked) { - appendLog("Installing RocketCyber (Priority 3)...", "cyan"); - try { - await fetch('/installRocketCyber', { method: 'GET' }); - appendLog("RocketCyber installation completed.", "green"); - } catch (error) { - appendLog("Error installing RocketCyber: ${error.message}", "red"); - } - } + if (document.querySelector('input[name="installRocketCyber"]').checked) { + appendLog("Installing RocketCyber (Priority 3)...", "cyan"); + try { + await fetch('/installRocketCyber', { method: 'GET' }); + appendLog("RocketCyber installation completed.", "green"); + } catch (error) { + appendLog("Error installing RocketCyber: " + error.message, "red"); + } + } + // NEW: Set Edge Default Search Engine + if (document.querySelector('input[name="setedgedefaultsearch"]').checked) { + appendLog("Setting Edge Default Search Engine (Priority 3)...", "cyan"); + try { + await fetch('/setedgedefaultsearch', { method: 'GET' }); + appendLog("Edge Default Search Engine set successfully.", "green"); + } catch (error) { + appendLog("Error setting Edge Default Search Engine: " + error.message, "red"); + } + } })(); } + + function endSession() {