Skip to content

Commit d640d8d

Browse files
committed
Changed: Bypass Execution Policy on Powershell during Invoke
1 parent 3c3d917 commit d640d8d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

source/Reloaded.Mod.Launcher.Lib/Utility/TryUnprotectGamePassGame.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ public static bool TryIt(string exePath)
4646
File.WriteAllLines(scriptPath, exeFiles, Encoding.UTF8);
4747

4848
// Run the script
49-
var command = $"Invoke-CommandInDesktopPackage -PackageFamilyName \"{packageFamilyName}\" -AppId \"{appId}\" -Command \"{compressedLoaderPath}\" -Args '\"{scriptPath}\"'";
49+
var command = $"-NoProfile -ExecutionPolicy ByPass -Command \"Invoke-CommandInDesktopPackage -PackageFamilyName '{packageFamilyName}' -AppId '{appId}' -Command '{compressedLoaderPath}' -Args '{scriptPath}'\"";
5050
var processStartInfo = new ProcessStartInfo
5151
{
5252
FileName = @"powershell",

0 commit comments

Comments
 (0)