diff --git a/CHANGELOG.md b/CHANGELOG.md index f04f149..c4aba0d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,7 +14,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Changed - Replaced PSexec with ServiceUI for intunewin sandbox ### Removed -- Removed psexec in favor of ServiceUI +- Removed PSexec in favor of ServiceUI + ## 2023-03-06 ### Added diff --git a/Sources/Run_in_Sandbox/IntuneWin_Install.ps1 b/Sources/Run_in_Sandbox/IntuneWin_Install.ps1 index f429993..9caf37b 100644 --- a/Sources/Run_in_Sandbox/IntuneWin_Install.ps1 +++ b/Sources/Run_in_Sandbox/IntuneWin_Install.ps1 @@ -27,13 +27,13 @@ Expand-Archive -LiteralPath "$Intunewin_Extracted_Folder\$IntuneWin_Rename" -Des Remove-Item "$Intunewin_Extracted_Folder\$IntuneWin_Rename" -Force Start-Sleep 1 -$ServiceUI = "C:\RunInSandbox\ServiceUI.exe" +$ServiceUI = "C:\Run_in_Sandbox\ServiceUI.exe" $WorkDir = "$Intunewin_Extracted_Folder\$FileName" $File = "$Sandbox_Folder\Intunewin_Install_Command.txt" $command = Get-Content -Raw $File -$cmd = "$ServiceUI -process:explorer.exe $command" +$cmd = "$ServiceUI -process:explorer.exe C:\Windows\System32\WindowsPowershell\v1.0\powershell.exe -ExecutionPolicy Unrestricted -NoProfile -WindowStyle Hidden -Command `"$command`"" Set-Location "$Intunewin_Extracted_Folder\$FileName"