From 2daec9d2876c740809f80aa961c6f146c41a1d90 Mon Sep 17 00:00:00 2001 From: Stephan Yelle Date: Fri, 19 Dec 2025 16:31:42 -0500 Subject: [PATCH] remove check if module installed --- samy.ps1 | 24 ------------------------ 1 file changed, 24 deletions(-) diff --git a/samy.ps1 b/samy.ps1 index fc2cf6f..87ddc00 100644 --- a/samy.ps1 +++ b/samy.ps1 @@ -1866,30 +1866,6 @@ function Invoke-InstallPrinters { return } - # Ensure printer install worker exists (from SVSMSP module or your module-integrated functions) - if (-not (Get-Command Invoke-SamyPrinterInstall -ErrorAction SilentlyContinue)) { - - Write-LogHybrid "Printer install cmdlets missing. Attempting Install-SVSMSP -InstallToolkit..." Warning Printers -LogToEvent - - try { - Install-SVSMSP -InstallToolkit - Import-Module SVSMSP -Force -ErrorAction SilentlyContinue - } - catch { - Write-LogHybrid "Auto-install of SVSMSP failed: $($_.Exception.Message)" Error Printers -LogToEvent - $Context.Response.StatusCode = 500 - Send-Text $Context "SVSMSP auto-install failed. Run 'Install SVSMSP Module' manually." - return - } - - if (-not (Get-Command Invoke-SamyPrinterInstall -ErrorAction SilentlyContinue)) { - Write-LogHybrid "SVSMSP installed but Invoke-SamyPrinterInstall still unavailable." Error Printers -LogToEvent - $Context.Response.StatusCode = 500 - Send-Text $Context "SVSMSP installed but printer install commands still not available. Restart SAMY." - return - } - } - # Read JSON body $rawBody = (New-Object IO.StreamReader $Context.Request.InputStream).ReadToEnd() if (-not $rawBody) {