Extracts the PowerShell script with parameter -extract:”Filename”

May 22, 2013 at 7:47 AM
Hello

Please can you add a parameter "-noextract" to prevent extracts the PowerShell script inside the EXE? That would be very cool :-)

Also a parameter for the ExecutionPolicy would be helpful, so that the EXE starts PowerShell with powershell.exe -ExecutionPolicy "XXX". Is that possible?


Thanks for anwser
May 29, 2013 at 1:38 PM
Can someone make a statement?
Perhaps a developer?
Coordinator
May 29, 2013 at 1:57 PM
Edited May 29, 2013 at 1:59 PM
Hi!

open ps2exe.ps1. search for this code:
if (!string.IsNullOrEmpty(extractFN))
{
System.IO.File.WriteAllText(extractFN, script);
return 0;
}
Remove these lines complety. Than "extract" will not work anymore! - That's it!

Changing the execution policy is more difficult. No time implementing it. But anyway you should set the execution policy outside.

Regards
Ingo