From 206856849a5b61de95deb638003f6a42ce5c4531 Mon Sep 17 00:00:00 2001 From: Stephan Yelle Date: Mon, 12 Jan 2026 11:55:13 -0500 Subject: [PATCH] Update samy.ps1 --- samy.ps1 | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/samy.ps1 b/samy.ps1 index 339e205..cabce80 100644 --- a/samy.ps1 +++ b/samy.ps1 @@ -19,11 +19,13 @@ if ($ExecutionContext.SessionState.LanguageMode -ne 'FullLanguage' -or if ($PSCommandPath) { powershell.exe -NoProfile -ExecutionPolicy Bypass -File "$PSCommandPath" @argList } else { - # IMPORTANT: pass args AFTER -Command so they become $args in the downloaded script - $bootstrap = "& { iwr 'https://samybeta.svstools.ca' -UseBasicParsing | iex }" + + # Download -> create ScriptBlock -> INVOKE it with @args so $args survives the relaunch + $bootstrap = "& { `$sb = [ScriptBlock]::Create((Invoke-WebRequest 'https://samybeta.svstools.ca' -UseBasicParsing).Content); & `$sb @args }" powershell.exe -NoProfile -ExecutionPolicy Bypass -Command $bootstrap @argList } + exit }