PS2EXE : "Convert" PowerShell Scripts to EXE Files

This PowerShell script lets you "convert" PowerShell scripts into EXE files.

 
 
 
 
 
4.5 Star
(64)
59,387 times
Add to favorites
3/5/2015
E-mail Twitter del.icio.us Digg Facebook
Sign in to ask a question


  • Produktversion
    2 Posts | Last post October 24, 2017
    • Hy Folks,
      is it possible to set a Produkt or Release Version to the exe File?
      
      Regardes Mike
    • Hello Mike-zdf,
      
      since Ingo Karstein does not develop PS2EXE any further, you have to use my version of PS2EXE (https://gallery.technet.microsoft.com/PS2EXE-GUI-Convert-e7cb69d5) or the one of Stuart Dootson to set version Information to the exe file.
      
      Greetings
      
      Markus
  • Hide Command Window
    3 Posts | Last post October 11, 2017
    • Is it possible to hide the black command window?
    • Hello Mike-zdf,
      
      try compiling your script with the additional parameter -noConsole
      
      Greetings
      
      Markus
    • Perfect.
      THX
      
       Mike
  • Get-Credential
    2 Posts | Last post September 24, 2017
    • The script I converted to exe has the Get-Credential option in it. When I run the exe as administrator I get the following text and error
      
      "cmdlet Get-Credential at command pipeline position 1
      Supply values for the following parameters:
      Credential:
      Exception in ik.PowerShell.PS2EXEHostUI.Prompt*2
      Windows PowerShell credential request
      Enter your credentials.
      User name: admin
      Cannot process argument transformation on parameter 'Credential'. Cannot process argument because the value of argument
      "password" is null. Change the value of argument "password" to a non-null value."
      
      as you can see it asks me for my user name but never asks for a password.  Is there anyway to fix this?
      
      Ryan B.
    • Hello RBleinin,
      
      this is an error in PS2EXE. Since Ingo Karstein obviously does not work on PS2EXE anymore, you can try my overworking that has this error fixed (among others):
      
      https://gallery.technet.microsoft.com/PS2EXE-GUI-Convert-e7cb69d5
      
      
      Greetings
      
      Markus
      
  • Version Error
    2 Posts | Last post September 08, 2017
    • We are running powershell version 5.1.  When I try to run your converter, it returns the error "THE POWERSHELL VERSION IS UNKNOWN!".  I redownloaded the above zip, but same issue.  Please advise.
    • Hello dottkp,
      
      it seems that Ingo Karstein does not improve his script anymore. So you have two choices:
      
      1. Change line 74 of ps2exe.ps1 from
      
      if($PSVersionTable.PSVersion.Major -eq 4) {
      
      to
      
      if($PSVersionTable.PSVersion.Major -ge 4) {
      
      2. Use one of the further developments of ps2exe
      
      The one from Rengifo, from Stuart Dootson or mine (https://gallery.technet.microsoft.com/PS2EXE-GUI-Convert-e7cb69d5).
      
      
      Greetings
      
      Markus
      
  • Problem with modules after compilation.
    1 Posts | Last post August 23, 2017
    • Sorry in advance if I haven't found answer to this question - I searched though.
      The issue is that when I run my script as .ps1 - all modules, GUI and functionality behaves as intended, though if I compile it to .exe - modules seems not to be working. All the functionality, except parts where scripts needs to work with PSRemoteRegistry and Quest AD snippet, works.
      Is there something in exe config file I am missing? Or something in compilation script I need to amend/alter?
  • virus detection
    1 Posts | Last post August 22, 2017
    • I have been using this to create exe and it works great.  but recently, my scripts are getting caught as trojans?  If i submit my ps1 to vt, it is clean, but if i submit my exe to vt it comes back with a detection.  is there something i need to do to avoid this.
      
      thanks
  • There is an issue with adding an icon
    1 Posts | Last post August 09, 2017
    • Providing an icon filename results in errors unless I place it in the c:\Windows\System32.  The problem appears to start at line 218:
      
      $iconFileParam = ""
      if(!([string]::IsNullOrEmpty($iconFile))) {
      	$iconFileParam = "/win32icon:$($iconFile)"
      }
      
      This will always result in the $iconFileParam resolving to the c:\Windows\System32 directory if you provide a file name.  I modified it to the following and it worked as expected:
      
      $iconFileParam = ""
      if(!([string]::IsNullOrEmpty($iconFile))) {
      	$iconFileParam = (join-path (split-path $inputFile) $iconFile)
      }
  • Using PS2EXE safely?
    4 Posts | Last post August 07, 2017
    • I compiled a ps1 file with this script and I have started to receive the trojan warning from the database update of ESET.
      
      is this a false positive or something wrong
      
      Threat :MSIL/CoinMiner.ABB
    • I'm getting the same error. I still can't find the solution. I will try contacting ESET about this.
    • If you find a solution or answer. Please Write here. Thank you.
    • After updating the Eset database no more errors.
  • Tasks
    2 Posts | Last post July 24, 2017
    • Hi 
      
      In first sorry for my english :)
      
      I try to protect my code by using your program but i have some issus when i try to use it with Windows Task Scheduler and arguments
      
      I try to launch 
      C:\TEMP\Program.exe -arg1 test -arg2 test2 / the program start but stop immediatly
      C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -File C:\TEMP\Program.exe -arg1 test -arg2 test2 / works
      Without Windows Task Scheduler the EXE work
      
      Can u help me ?
      
      Thanks
    • New test :
      if i lunch Windows Task with .EXE without "-noconsole" it's works...
  • Encapsulating Files
    1 Posts | Last post July 23, 2017
    • PowerGUI from Quest allows you do add files to the exe so that when the exe runs, it expands into a temp directory and all files are there for the ps1 to see.
      
      Any chance this tool does that and if not, can it be added?
      
      MSI files are a prime example of a file a ps1 may need to open.
1 - 10 of 80 Items