Rename temp scripts to .ps1

PowerShell won't execute scripts that don't end in .ps1
redistributables
Pat Hartl 2023-10-27 18:54:19 -05:00
parent 5e47d8fa3d
commit 06188d5800
1 changed files with 4 additions and 0 deletions

View File

@ -451,6 +451,10 @@ namespace LANCommander.PlaynitePlugin
{ {
var tempPath = Path.GetTempFileName(); var tempPath = Path.GetTempFileName();
File.Move(tempPath, tempPath + ".ps1");
tempPath = tempPath + ".ps1";
Logger.Trace($"Writing script {script.Name} to {tempPath}"); Logger.Trace($"Writing script {script.Name} to {tempPath}");
File.WriteAllText(tempPath, script.Contents); File.WriteAllText(tempPath, script.Contents);