From 0a2c2027b16d1c367eb90af8e4e02f81fc42d69e Mon Sep 17 00:00:00 2001 From: Stephan Yelle Date: Sun, 22 Jun 2025 15:52:28 -0400 Subject: [PATCH] Update SM.ps1 --- SM.ps1 | 28 +++++++++++++++++++++++++--- 1 file changed, 25 insertions(+), 3 deletions(-) diff --git a/SM.ps1 b/SM.ps1 index 14a05ed..5a2bb5f 100644 --- a/SM.ps1 +++ b/SM.ps1 @@ -3,6 +3,23 @@ #endregion +#region ScriptMonkey Entrypoint + +[CmdletBinding()] +param( + [switch]$SilentInstall +) + +# If the user asked for a silent install, do just that and quit +if ($SilentInstall) { + Write-LogHelper -Message "Silent install requested" -Level Info -TaskCategory "Startup" + Install-SVSMSP -InstallToolkit + return +} + +#endregion + + # STACK = Scripted Tooling for Automated Client Kickoff # MONKEY = Module-based Onboarding & Next-step Kickoff Engine Yoke # Conveys the idea of coupling tasks together and keeping them under control. @@ -1231,9 +1248,14 @@ function Start-Server { #endregion - +# Only launch UI if not in silent mode +if (-not $SilentInstall) { + Start-Process "msedge.exe" -ArgumentList "--app=http://localhost:$Port" + Start-Server +} +#endregion # open browser on whatever port you've set -Start-Process "msedge.exe" -ArgumentList "--app=http://localhost:$Port" +#Start-Process "msedge.exe" -ArgumentList "--app=http://localhost:$Port" # now start your server (this will block until you hit Exit in the UI) -Start-Server +#Start-Server