Questions tagged [ps2exe-gui]

Use this tag for questions about the use of the tool PS2EXE-GUI

PS2EXE-GUI is an extension of the popular script PS2EXE. It includes Powershell script compiling into a graphical user interface (GUI) version on top of a console version.

For more information about the features or to download PS2EXE-GUI, visit the official script listing on Microsoft Script Center.

14 questions
6
votes
1 answer

Script calls other script as .ps1 but not as a .exe using ps2exe

$password = ConvertTo-SecureString “Password+++” -AsPlainText -Force $Cred = New-Object System.Management.Automation.PSCredential ("Admin", $password) $FileLocale = Split-Path -Parent -Path $MyInvocation.MyCommand.Definition Write-Output…
3
votes
3 answers

prevent a form closing with $Form.Close() returning "Cancel"

In my PowerShell script I display a form and I use the $Form.Close(); command to close it. It closes fine however when it does so it returns the word Cancel (it also does this if I manually close the form by pressing the top-right red-x). This was…
Richie W
  • 31
  • 1
  • 3
2
votes
1 answer

running ps2exe in github actions

I am trying to automatically "compile" my ps1 script to .exe file on push. So I wrote the yml file to install ps2exe then run it on the script file that is in root of my repo. I took the PSScriptAnalyzer from the demo and modified it. name: GitHub…
user206904
  • 504
  • 4
  • 16
2
votes
0 answers

PowerShell progress bar for file download when using PS2EXE

TL;DR: Need better way to implement progressbar for Powershell File download. I have a .PS1 script with a GUI that I converted to a EXE using PS2EXE. I have a piece of code that downloads a large zipfile (~4GB) from the internet. Start-BitsTransfer…
nmpereira
  • 43
  • 3
1
vote
1 answer

Powershell ps2exe config variable

I would like To store a variable in a config file for a .ps1(powershell script) converted to .exe using ps2exe $LnkPath="...\" #Directory Path of .lnk $LnkFile="\nnnn.lnk" #name of .lnk file Invoke-Item $ScriptPath + $LnkFile I was hoping to have…
cdickstein
  • 55
  • 5
1
vote
1 answer

Start new shell not working when the ps1 has become executable with ps2exe

I am trying to create an executable (.exe) at windows that will perform some actions at first, and then open an interactive shell. In my case the interactive shell I want to be a wsl, but the problem is shown with every type of shells created. For…
Andreas Foteas
  • 422
  • 3
  • 11
1
vote
1 answer

Different Behavior between .ps1 vs exe

I hope you're well. I am currently facing to some incomprehensible behavior which you can find the description of below. What this code do? Check in 2 registry location (32 and 64 bits) for Ins_ProductVersion If nothing found then message displayed…
LEFBE
  • 125
  • 1
  • 9
1
vote
1 answer

Using PS2EXE when reusing code through modules

I'm developing some scripts that I later pack into EXE using PS2EXE to ship to end user. The key point here is that they only know how to double click executable and they want to do just that. The script then builds simple GUI using WPF where end…
miguello
  • 544
  • 5
  • 15
0
votes
0 answers

How can I make Progress Bar work with ps2exe?

I have made a script that uses progress bars with the write-progress cmdlet that run fine in ISE or when executed with powershell as a .ps1 but when converted with ps2exe GUI and even with the parameter -noConsole the progress bars are not displayed…
JohnGeo
  • 1
  • 1
0
votes
1 answer

module not found after converting script with ps2exe

I built a simple GUI powershell script that runs exactly how I want it on many different computers (after installing all the right modules I also tried installing them with the -scope allusers). when I compile the script using ps2exe it throws…
0
votes
0 answers

Convert PowerShell script importing within other PowerShell script to EXE

I have been trying to convert a powershell script to exe, So I came across this tool PS2EXE by this thread. Now the exe is successfully created but the issue is, the converting powershell script on top imports another powershell scripts and use…
Hack Try
  • 471
  • 4
  • 17
0
votes
0 answers

Can anyone help me create a progress bar in powershell while the script is running?

I've already tested Write-Progress, and when I put it multiple times along with a "Start-Sleep -Milliseconds 250" it seems to work perfectly, but when I try to implement it in my script, where I put the percentage in each script step, it doesn't…
0
votes
0 answers

Powershell tool ps2exe with SQL Query, login failed

I'm new on this site and a newby in programming Powershell. I've made a Powershell script with forms. In the script I've made a connection string to a SQL server with integrated security (also tried credentials(domain and sql). In ISE all working…
rayrol
  • 1
  • 1
0
votes
2 answers

Possible to constrain form data powershell?

I created a Windows form in Powershell which I am then using PS2EXE-GUI to make an executable...I am struggling with this part, as it relies a LOT on user input to be correct: $form = New-Object System.Windows.Forms.Form $form.Text = "'Enter ID…