microsoft / MSIX-PackageSupportFramework

The Package Support Framework (PSF) is a kit for applying compatibility fixes to packaged desktop applications.
MIT License
115 stars 57 forks source link

PsfPowershellScriptRunner error after MSIX installation #164

Closed lianck closed 1 year ago

lianck commented 3 years ago

PSFPowershellSCriptRunner

"startScript": { "scriptExecutionMode": "-ExecutionPolicy RemoteSigned", "runOnce": true, "showWindow": false, "scriptPath": "CopyFile.ps1" }

dhoehna commented 3 years ago

Hey lianck,

Can you please let me know what release of PSF you are using, or did you pull the code down and compile it your self?

lianck commented 3 years ago

Hey lianck,

Can you please let me know what release of PSF you are using, or did you pull the code down and compile it your self?

I build the MSIX from Advanced Installer. Found it is happening when I place program files inside VFS.

dhoehna commented 3 years ago

Thank you for the reply.

Is the file "StartingScriptWrapper.ps1" inside the package as well?

lianck commented 3 years ago

"StartingScriptWrapper.ps1" is inside the package, together with my ps file. After installation, ps1 files are under the application root folder, and my main program is inside "VFS\ProgramFilesX64".

dhoehna commented 3 years ago

I believe I know what is gong on. PSF looks in the directory of the executable to find "StartingScriptWrapper.ps1" and "CopyFile.ps1" At the moment I don't remember if it looks in the directory of PSF or your executable.

Can you please try moving both "StartingScriptWrapper.ps1" and "CopyFile.ps1" to the directory that PSFLauncher.dll is under? If that does not work can you please try moving "StartingScriptWrapper.ps1" and "CopyFIle.ps1" to VFS\ProgramFilesX64 (Where you main program is)?

dhoehna commented 3 years ago

Hey @lianck sorry for the long wait. I broke the PSF Scripting behavior. The correct behavior is in the develop branch if you would like to use it.

npuvvada commented 1 year ago

This issue is fixed from PSF release : version 1.0.220926.1