# Message Box issue with PS EXE file

**URL:** <https://forums.powershell.org/t/message-box-issue-with-ps-exe-file/21692>\
**Category:** PowerShell Help\
**Created:** [February 19, 2023, 10:30pm UTC](https://forums.powershell.org/t/message-box-issue-with-ps-exe-file/21692 "2023-02-19T22:30:00Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![brian-clanton](https://avatars.discourse-cdn.com/v4/letter/b/ebca7d/32.png) [@brian-clanton](https://forums.powershell.org/u/brian-clanton)\
**Post date:** [February 19, 2023, 10:30pm UTC](https://forums.powershell.org/t/message-box-issue-with-ps-exe-file/21692/1 "2023-02-19T22:30:00Z")

</div>

I am creating a simple PowerShell message box to give the user error information but when I build my script to an EXE file, the prompt does not show.

I can replicate the problem with a simple script here. I verified that this works but when I use PowerShell Studio to Build an EXE file…the prompt does not show.

Anyone know what I am missing?

$Computer = $env:COMPUTERNAME  
[System.Windows.Forms.MessageBox]::Show($Computer, ‘title’,‘OK’)

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex019/uploads/powershell/original/1X/385e4f9fe133561ad30a814262fe0e0ae6bc3ef0.png) [@system](https://forums.powershell.org/u/system)\
**Post date:** [February 10, 2024, 5:34pm UTC](https://forums.powershell.org/t/message-box-issue-with-ps-exe-file/21692/2 "2024-02-10T17:34:06Z")

</div>

Closed on February 10, 2024, 5:34pm UTC

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
