PS2EXE-GUI: "Convert" PowerShell Scripts to EXE Files with GUI

Overworking of the great script of Ingo Karstein with GUI support. The GUI output and input is activated with one switch, real windows executables are generated. With Powershell 5.x support and graphical front end.
4.7 Star
34,259 times
Add to favorites
E-mail Twitter Digg Facebook
Sign in to ask a question

  • testing
    1 Posts | Last post October 03, 2019
    • testing please ignore
  • All questions deleted
    1 Posts | Last post October 01, 2019
    • Somehow Microsoft managed to delete all questions.
      If your question was not already answered, please ask again.
  • All questions deleted
    1 Posts | Last post October 01, 2019
    • Somehow Microsoft managed to delete all questions.
      If your question was not already answered, please ask again.
  • Problem Printing
    2 Posts | Last post September 28, 2019
    • Hi Markus!
      I made a script to print barcodes. It's a windows form in which you input characters and takes those characters puts them into a URL and downloads a JPG file. Then that file gets printed using windows "Print Pictures". I cant make this work with PS2EXE but i managed to make it work with sapiens powershell studio. Any ideas?
    • Hello Javier,
      I need (much) more information to answer.
      Can you tell me what does not work? What is the expected behaviour and what happens? Is there an error message? What is "Print Pictures", an application?
  • Encoding
    2 Posts | Last post September 27, 2019
    • Hello!
      Would it be possible to add an option to change the encoding? I see that you set the encoding to UTF8, but in scripts that use Active Directory fields (ANSI) this causes errors in filenames and things like that. I have solved this problem by replacing all "UTF8" with "Default" in your script, but it would be nice to have an option to choose the desired encoding in the GUI or even through command line.
      Thank you!
    • Hello A.F. Alves,
      without investigating this topic, wouldn't it be the better way you convert or create your scripts in UTF8 or UNICODE Format. I think this would be much better because I guess those scripts would work independent of the localized character set of the computer.
      This was the reason for me to choose UTF8 as encoding since it "understands" UTF8 and UNICODE and is not langauge dependend.
  • Link
    2 Posts | Last post September 23, 2019
    • Hi Markus,
      I hope is it OK for you that I linked your tool within my blog post: (available in German as well).
      Thank you for this nice tool, Florian
    • Hello Florian,
      this is perfectly all right. Thank you for asking and mentioning.
  • Issue with come commands
    5 Posts | Last post September 20, 2019
    • Hi
      When I am using some cmdlets related to Hyper-V like:
      I get a blinking window (1 milisecond only) when I run the compiled exe.
      Please help.
    • Hello EmilSkibsted,
      I guess the "blinking window" is the Shell that opens when you run your command. You have two options:
      1. Start your program out of a Powershell window (or cmd.exe window)
      2. Compile with the Option -noConsole
    • Hi again
      1. Not sure what you mean? I am compiling the exe from a .ps1 file.
      2. I am using the option -noConsole.
      IT is only for the cmdlets that relate to Hyper-V that is causing the blink. If add fx. Get-Service or something else there is no blinks...
    • I just filmed the popup, and it is a white window with the label: Progress.
    • Hello EmilSkibsted,
      I understand now. When loading modules or assemblies, PowerShell shows a progress bar (you may not notice it because it's shown for a short time only). When compiling with PS2EXE and -noConsole to a graphical executable, the progress bar obviously is shown in a window: your "blinking window".
      Please set the following command to the beginning of your script to prevent progress bars:
      $ProgressPreference = 'SilentlyContinue'
      To reenable progress bars use
      $ProgressPreference = 'Continue'
  • Is it possible to "pack" any other loaded files into the executable?
    2 Posts | Last post September 18, 2019
    • Hi,
      I use a PowerShell script to download data from an Analysis Services tabular model. I load a custom .dll library an other extra files into the script.
      Is it possible to "pack" all this resources into the executable file in order to have standalone application?
      Thanks and best regards!! 
    • Hello iRoger,
      you want to create some kind of installer or self-extracting archive for your script, this is too much work for PS2EXE to integrate this function. I recommend an archiving tool like 7Zip or a program to create installers (Windows provides one with IExpress) for your purposes.
  • Is it possible to protect again a decompile?
    3 Posts | Last post September 13, 2019
    • Hi there, is there a way to protect the .exe against a decompile backup to ps1 so I can protect the sourcecode of the software?
    • Hello Stefan071,
      this makes not really sense since PS2EXE encodes and not encrypts the source script.
      But you may open ps2exe.ps1 with a (good) text editor and replace the expression
        s.StartsWith("-extract", StringComparison.InvariantCultureIgnoreCase)
      Any script you compile afterwards is not decodable with a command line parameter, but still is decodable with a hex editor (and a lot of knowledge).
    • Thank you very much Markus. When you have a bit of your IP in the PS code it is really handy to know you are able to stop decompile. I know it's not 100% safe but it's a lot better than having it be super easy to get to the source and whatever.
      So thank you!
  • unable to decompile EXE to ps1
    2 Posts | Last post September 08, 2019
    • Hi Markus,
      One of my script was converted to EXE from PS1 and its not supporting for vSphere 6.7 environment. So i need to modify the script and tried to extract using -extract:”Filename”.
      Ex- .\ps2exe.ps1  VCMRv3.exe -extract:C:\Users\ankoj\Downloads\VCMR.ps1
      Could you please help on this ?
    • Hello Ankoji,
      it is easier as you think, try
      VCMRv3.exe -extract:C:\Users\ankoj\Downloads\VCMR.ps1
      without the .\ps2exe.ps1 in front.
21 - 30 of 171 Items