Hi marcus I've posted an issue on Github as I can't attach images here Thanks
Hello Scepticyn, I saw the issues, the one with Win-PS2EXE will be easy to fix, the other one not. Have to think about it if there's an reasonable way to work around since it is a "seldom" issue. Greetings Markus
Hello Scepticyn, the new version 0.5.0.18 of PS2EXE addresses your issues. For PS2EXE I followed the Windows approach of first selecting 5/8 of the screen as the maximum size of a window. In Win-PS2EXE I just fixed the field size. Greetings Markus
Hi, I love the GUI and the way it is helpful in the changing the PS file to exe. but in the past couple of days I have been seeing issues while scanning the PC with Symantec Antivirus as Security risk detected:"Heur.AdvML.B". and it is deleting the exe automatically from the PC to protect the PC. I am using Symantec Endpoint protection antivirus 14.2 RU1 MP1. Kindly suggest how can overcome this issue when we use the GUI method for creating the exe. Thanks Balaji S
Hello Balaji, there is not much we can do. I sent two example files to VirusTotal and there was an detection rate of 4 from 64 respectively 9 from 64. The reason for this is that PS2EXE compiles scripts to executables. This is suspicious! For some scanners it is suspicious enough to block. The only possibility is to use your contact to Symantec to upload an sample so they check it is not dangerous. Greetings Markus
Hi, I love your script. I was wondering if you'd considered uploading it as a module to https://www.powershellgallery. com ? This would allow for easier installation of the module and version control. I'm not sure if it would be feasible with your particular module (not sure what the requirements are or if it would need to be redesigned / repackaged), but I thought it would be worth mentioning anyways. Either way, thanks again for your awesome script!
Hello Jeffrey, please read the Description page, there are the instructions and the links to PowerShell Gallery (https://www.powershellgallery .com/packages/p s2exe) and GitHub (https://github .com/MScholtes/ PS2EXE) for the module Version. Greetings Markus
I have a script that I would like to package using PS2EXE and be able to run it on Win7 or Win10 without a config file. All computers I will run it on will have .NET4 so I would like to be able to specify the requirements as Powershell2 and .NET4. Currently if I build the exe on Win7, I can run it on win10 but I get a prompt to install .NET2/3.5. If I use a config file with .Net4 specified it will run fine on Win10 without installing .NET2/3.5 but I would prefer not to have to distribute a config file with the exe. If I build the exe on Win10 and try to run it on win7 I get an error that the program has stopped working and I see the following error in the console. Unhandled Exception: System.IO.FileNotFoundExceptio n: Could not load file or assembly 'System.Managem ent.Automation, Version=3.0.0.0 , Culture=neutral , PublicKeyToken= 31bf3856ad364e3 5' or one of its dependencies. The system cannot find the file specified. at ik.Powershell.P S2EXE.Main(Stri ng[] args) Is there a way to specify requirements as Powershell2 and .NET4 so it will run on win7 or win10 running .NET4?
Hello KMarryat, when I understand your environment correctly you try to do something that cannot function: - PowerShell Version 2 works only with .Net 2 or .Net 3 and NOT with .Net 4 - PowerShell Version 3 or up is NOT included in .Net 4 You have two choices when you want to use one binary: - install .Net 3 on Windows 10 and use PowerShell V2 there with a config file that enforces PowerShell 2 - install WMF 5.1 on Windows 7 so you can use PowerShell V5.1 there with a config file that enforces PowerShell 5.1 Greetings Markus
Hello Markus, thank you for overworking and maintaining this project, very much appreciated. Im using ps2exe for converting a powershell script with a gui to a standalone .exe. The GUI is build with System.Windows.Forms-elements, so nothing out of the ordinary. However, after compiling to an .exe-File german special cases / "Umlaute" like äöüß are not displayed correctly anymore. Instead, these characters are displayed like "?". It seems like there is a change of encoding going on in the encapsulating process and the new charset does not support these characters. Are these special characters supported? Regards, Jakob
Hello Jakob, PS2EXE can handle special characters like Umlauts but expects the source file to be UTF8 oder Unicode encoded. Please convert your source file before compiling, for example with gc .\sourceASCII.ps1 | sc sourceUTF8.ps1 -Encoding UTF8 Greetings Markus
Hello, I wrote a PS script and it compiles and works as expected. Without the .ico file, i can compile the script and create an app without any issue. How do i add an .ico file in the application. Below is the error i get when i compile with the .ico file. Below is the error. Any help would be appreciated. PS2EXE-GUI v0.5.0.16 by Ingo Karstein, reworked and GUI support by Markus Schol es You are using PowerShell 4.0 or above. Reading input file C:\PS2EXE-GUI\ECKOH_TOGGLE\ECK OH_TOGGLE.ps1 Compiling file... C:\PS2EXE-GUI\p s2exe.ps1 : Could not create the PowerShell .exe file because of compilation errors. Use -verbose parameter to see details. At line:1 char:1 + & 'C:\PS2EXE-GUI\ ps2exe.ps1' -inputFile 'C:\PS2EXE-GUI\ ECKOH_TOGGLE\E ... + ~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~ ~~~~~~~~~ + CategoryInfo : NotSpecified: (:) [Write-Error], WriteErrorExcep tion + FullyQualifiedE rrorId : Microsoft.Power Shell.Commands. WriteErrorExcep tio n,ps2exe.ps1 VERBOSE: warning CS1668: Invalid search path 'C:\Sybase32\LI B' specified in 'LIB environment variable' -- 'The system cannot find the path specified. ' VERBOSE: error CS1567: Error generating Win32 resource: Error reading icon 'c:\PS2EXE-GUI\ logo-x2.ico' -- The data is invalid. Press Enter to leave:
Hello Maheswar Tamang, please read the error message and correct the environment variable LIB, where a non existing path C:\Sybase32\LIB is specified. Greetings Markus
Hello Markus. Can I run Compiled.exe file in Windows Recovery Environment? I have tried and get no output or error. Also thanks very much for Win-PS2EXE gui update. Greetings
Hello Minh Cường, this does not work since there is no PowerShell installed in Windows RE. There are some instructions on how to install PowerShell in Windows RE on the web but it is quite difficult. Greetings Markus
When I run by Win-PS2EXE.exe returns the file .exe was generated successfully, however when checking the path which is supposed to be there the file is not there. I am using Windows 10 BR
Hello PauloGuimares, Microsoft has finally solved the problem of the missing questions so that I can answer now: Can you please tell me in which path Win-PS2EXE.exe, ps2exe.ps1 and the script to compile are? Which version of ps2exe.ps1 you are using? Greetings Markus
After compiling below script, and run. It will throw out an exception. Any way to fix it? Get-ChildItem -literalpath \\?\C:\ It works well in powershell 5.1
Hello rocklee, Microsoft has finally solved the problem of the missing questions so that I can answer now: Please use the switch -longPaths to enable this functionality. The config file has to be in the same directory as the executable so this works. Greetings Markus
How can I get exe path in powershell code? Then I compile ps1 to exe $script:MyInvocation.MyCommand .Path is empty ... I can use parameter but sometimes it is undesirably
Hello Kuznetcovay, Microsoft has finally solved the problem of the missing questions so that I can answer now: Please see the comment "Script variables:" in the "Remarks" section of this web page. Greetings Markus