k blog.kenaro.com
← All articles

Update of PS2EXE: Version 0.4 now support Single and Multi Thread Apartment and “NoConsole” mode

· Ingo Karstein

On Codeplex user redpark asked for “Single Thread Apartment” mode (http://ps2exe.codeplex.com/discussions/435946)…

Here it is…

Please see v0.4 on CodePlex:

http://ps2exe.codeplex.com.

There are 3 new parameters:

-staSingle Thread Apartment mode

(see http://msdn2.microsoft.com/en-us/library/system.stathreadattribute(VS.71).aspx)

-mtaMultithread Apartment mode

(see http://msdn2.microsoft.com/en-us/library/system.mtathreadattribute(VS.71).aspx)

-noconsoleresulting EXE is an Windows application not a console application.

 

The –noconsole parameter lets you create a Windows application EXE file with no console window.

Therefore I would need to implement several extensions for the PowerShell host included in the resulting EXE but currently I have not enough time to do this. But for now I’ve implemented the credential prompt so cmdlet Get-Credential will work as expected.

3 comments

Floris Oct 11, 2016
i would love to try it out, current version give's me an error. When will Powershell V5 Support be added?
Fr. Vandecan Apr 15, 2018
if this tools compatible with PS1 and a mixed of psm1 files?.
Cloudguru Jul 7, 2018
I used your script to covert my script in exe. my script is GUI based tool. when I run my script in Powershell ISE the form is showing correctly. But when I run the exe created Form is covering full screen and some of the contents are missing. Please suggest.

Leave a comment

Your comment is reviewed before it appears. Your name is shown with the comment; your email is required for moderation but never published.