nickrod518 / Create-EXEFromPS1

Takes one PowerShell script and any number of supplementary files or even a directory and creates an exe using Windows's built in iexpress program. The exe will run on any machine with PowerShell 2.0+.
94 stars 31 forks source link

Added OutDir, changed default arch, and bug fix. #8

Closed etcha-sketch closed 3 years ago

etcha-sketch commented 3 years ago

Added and OutputDirectory parameter to allow for the final executable to be stored elsewhere from the PSScriptPath.

Changed the default architecture support to x64 and changed all references to the -x64 parameter to -x86 for compatibility as most devices should be running 64 bit versions of Windows by now.

Fixed Incorrect Cast of $SignFiles The parameter $SigningCertificate was used to detect if the user had defined a certificate to sign scripts and the final executable with. If the script detected that the $SigningCertificate variable was null it would skip signing for the rest of the script. Unfortunately this introduced a slight bug as when the user does not specify a signing certificate, the $SigningCertificate variable is actually a null string rather then being completely null. The tool would still work fine and output the executable as desired, but the verbose screen would be clogged with failed signing attempts. This is fixed by checking the variable to be a non-null string and not a null value.

nickrod518 commented 3 years ago

Excellent work - I’m sure many, including myself, will find these new features very useful!