How to properly set path in Powershell and 7zip?
问题 I have a Powershell script to create a self-extracting archive via 7zip. But it's receiving this error: cannot find specified SFX module The Powershell code is: set-alias sz "$env:ProgramFiles\7-Zip\7z.exe sz a -t7z -sfx -ppassword $fullpath $filetostore Both variables are valid. I've tried -sfx and -sfx7z.sfx , same error. The 7z.sfx file is indeed in the correct folder with 7zip. I can also verify the alias is working, as the 7zip copyright appears when running the code (so 7zip commandline