# Powershell progress in PS2EXE with close button?

**URL:** <https://forums.powershell.org/t/powershell-progress-in-ps2exe-with-close-button/15359>\
**Category:** PowerShell Help\
**Created:** [December 8, 2020, 6:46pm UTC](https://forums.powershell.org/t/powershell-progress-in-ps2exe-with-close-button/15359 "2020-12-08T18:46:44Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![botany0culinary](https://avatars.discourse-cdn.com/v4/letter/b/22d042/32.png) [@botany0culinary](https://forums.powershell.org/u/botany0culinary)\
**Post date:** [December 8, 2020, 6:46pm UTC](https://forums.powershell.org/t/powershell-progress-in-ps2exe-with-close-button/15359/1 "2020-12-08T18:46:44Z")

</div>

I have made a small gui program in Powershell Studio. If I use the .ps1 file in powershell it does show the “Write-Progress -Activity” in the background and when I close the program it does this as well.

BUT…when compiling it with [PS2EXE](https://gallery.technet.microsoft.com/scriptcenter/PS2EXE-GUI-Convert-e7cb69d5) it does give this neat thingie. But the X-button has dissapeared and to close I have to press ctrl+f4.

`Write-Progress -Activity “Replacing Words” -CurrentOperation “Ersätter $($find) med $($replace)” -Status “Processing $($ord.IndexOf($_) + 1) of $($ord.Length)”`

**01.** Is there a way to make it close the progress window when its done automaticly?  
**02.** Is it possible to add the X-button at the top or a “ok”-button to easy quit?

 ![](https://us1.discourse-cdn.com/flex019/uploads/powershell/original/2X/7/7d79021a79a959839af2bd598c1359353e6119a7.jpeg)

---

<div class="post-metadata">

**Author:** ![botany0culinary](https://avatars.discourse-cdn.com/v4/letter/b/22d042/32.png) [@botany0culinary](https://forums.powershell.org/u/botany0culinary)\
**Post date:** [December 8, 2020, 7:13pm UTC](https://forums.powershell.org/t/powershell-progress-in-ps2exe-with-close-button/15359/2 "2020-12-08T19:13:03Z")

</div>

Stupid me:

1. `Write-Progress -Activity “Klar…” -Completed`

But I do want the X-button in the corner.

---

<div class="post-metadata">

**Author:** ![dotnVo](https://avatars.discourse-cdn.com/v4/letter/d/4af34b/32.png) [@dotnVo](https://forums.powershell.org/u/dotnVo)\
**Post date:** [May 16, 2024, 8:28pm UTC](https://forums.powershell.org/t/powershell-progress-in-ps2exe-with-close-button/15359/3 "2024-05-16T20:28:13Z")

</div>

Closed on May 16, 2024, 8:28pm UTC


