diff --git a/tiny11maker.ps1 b/tiny11maker.ps1 index c24757f..b4e96ea 100644 --- a/tiny11maker.ps1 +++ b/tiny11maker.ps1 @@ -90,7 +90,7 @@ if (! $myWindowsPrincipal.IsInRole($adminRole)) { Write-Output "Restarting Tiny11 image creator as admin in a new window, you can close this one." $newProcess = new-object System.Diagnostics.ProcessStartInfo "PowerShell"; - $newProcess.Arguments = $myInvocation.MyCommand.Definition; + $newProcess.Arguments = "-NoProfile -ExecutionPolicy Bypass -NoExit -File `"$($myInvocation.MyCommand.Definition)`""; $newProcess.Verb = "runas"; [System.Diagnostics.Process]::Start($newProcess); exit @@ -533,3 +533,4 @@ Stop-Transcript exit +