From 06188d5800640d3cceebe945ee314026e80da09d Mon Sep 17 00:00:00 2001 From: Pat Hartl Date: Fri, 27 Oct 2023 18:54:19 -0500 Subject: [PATCH] Rename temp scripts to .ps1 PowerShell won't execute scripts that don't end in .ps1 --- LANCommander.Playnite.Extension/InstallController.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/LANCommander.Playnite.Extension/InstallController.cs b/LANCommander.Playnite.Extension/InstallController.cs index d3fac1d..7025e4a 100644 --- a/LANCommander.Playnite.Extension/InstallController.cs +++ b/LANCommander.Playnite.Extension/InstallController.cs @@ -451,6 +451,10 @@ namespace LANCommander.PlaynitePlugin { var tempPath = Path.GetTempFileName(); + File.Move(tempPath, tempPath + ".ps1"); + + tempPath = tempPath + ".ps1"; + Logger.Trace($"Writing script {script.Name} to {tempPath}"); File.WriteAllText(tempPath, script.Contents);