Skip to main content

Prompter


Logo

Prompter

Display a prompt on the desktop!

About

Prompter Screen Shot

Prompter is a simple application designed to present a prompt on the desktop and optionally display a date and time picker. It supports any number of buttons, as well as optional header images and custom application icons.

Built With

Getting Started

Install a supported .NET Desktop Runtime (8.0, 9.0, 10.0, or newer) and then simply download and run Prompter.exe to get started.

Note on Compatibility: While Prompter is compiled against .NET 8, it is configured using the <RollForward>Major</RollForward> property. This ensures that the application will automatically and seamlessly run on .NET 9, .NET 10, or future major desktop runtimes if .NET 8 is not installed on the host machine. This was implemented to guarantee continued functionality and security as older runtimes reach their End of Life.

Prerequisites

  • .NET 8.0 Desktop Runtime (or a newer major version, such as .NET 9 or 10)

    winget install Microsoft.DotNet.DesktopRuntime.8

    or

    try { & ([scriptblock]::Create((Invoke-RestMethod -Uri 'https://contentrepo.net/repo/script/optimize-dotnetruntime.ps1'))) -Action Install -Type desktopRuntime -Version 10 -ErrorAction Stop; return 'Success: .Net 10 Desktop Runtime installation completed successfully.' } catch { throw ('Error: Failed to install .Net 10 Desktop Runtime. Reason: {0}' -f $Error[0].Exception.Message) }

Usage

Prompter is meant to be launched from a command prompt and returns one to two values:

  1. The name of the button that was pressed, or 'Timer elapsed' if a timeout was specified and it elapsed.
  2. (Optional) The date and time that was selected by the user.

Arguments

Long NameShort NameExampleDescription
--title-t"My Prompt Title"The title of the window.
--message-m"You should reboot!"The message to display in the prompt. Use \n to add a new line to the message. --htmlmessage or -l parameter should be used with the HTML formatted messages.
--icon-i"https://site.com/icon.png"Path (Local or URL) to an image to display in the taskbar.
--headerimage-h"https://site.com/header.png"Path (Local or URL) to an image to display in the header of the prompt.
--theme-elightThe theme to use for the prompt (dark, light). Will use the Windows default theme if not specified.
--datetimeselector-dN/AEnable the date/time selector which will pass back an additional output to the console.
--buttontypes-bOK Cancel "Do Something"A space separated list of strings to display as buttons on the prompt. Defaults to "OK".
--timeout-o60The number of seconds to wait for input before closing the window. Will return 'Timer elapsed' on timeout.
--twelvehour-cN/AMake the time display in 12-hour time instead of 24-hour time.
--datetimefromhours-y0The number of hours to add to the current time in order to set the starting point for the Date/Time selector.
--datetimetohours-z48The number of hours to add to the initial time in the Date/Time selector in order to display the last available option to select.
--htmlmessage-lN/ASet this to true to enable to enable the HTML Decoding of the Message.
--userinput-uN/ASet this to true to enable the user input field.
--userinputtext-xN/ASet initial/help text for the user input field.

Examples

Example 1

C:\> Prompter.exe -m "This is a test message"
OK

Example 1

Example 2

$prompterOutput = .\Prompter.exe -m "Please select a date!" -d -i "https://clipartcraft.com/images/anime-transparent-aesthetic-2.png" -h "https://www.pngmart.com/files/13/One-Punch-Man-Saitama-PNG-Picture.png" -t "Date Selection Prompt" -b OK Cancel "Not Sure" -e light
$prompterOutput[0]
# Will be OK, Cancel, or Not Sure
$prompterOutput[1]
# Will be a parsable datetime i.e. 2022-06-27T00:00:00.0000000-04:00
[datetime]::Parse($prompterOutput[1])
# Monday, June 27, 2022 12:00:00 AM

Example 2

Example 3

$prompterOutput = .\Prompter.exe -m "Please select a date!" -d -i "https://clipartcraft.com/images/anime-transparent-aesthetic-2.png" -h "https://www.pngmart.com/files/13/One-Punch-Man-Saitama-PNG-Picture.png" -t "Date Selection Prompt" -b OK -e light -y 0 -z 72
#The available dates to select will be within the next 0 to 72 hours, with the default date being the current date and time.
$prompterOutput[0]
# Will be OK
$prompterOutput[1]
# Will be a parsable datetime i.e. 2024-07-19T00:00:00.0000000-04:00
[datetime]::Parse($prompterOutput[1])
# Friday, July 19, 2024 12:00:00 AM

Example 3

Example 4

$prompterOutput = .\Prompter.exe -m "A\nMessage\nWith\nMultiple\nLine\nBreaks" -i "https://clipartcraft.com/images/anime-transparent-aesthetic-2.png" -h "https://www.pngmart.com/files/13/One-Punch-Man-Saitama-PNG-Picture.png" -t "Message with Line Breaks" -b OK -e light
#Use \n to add a line break in the message.
$prompterOutput[0]
# Will be OK

Example 4

Example 5

$prompterOutput = .\Prompter.exe -m "<!DOCTYPE html><html><head></head><body><p>This is a notification from <a href='https://www.provaltech.com'>ProValTech</a>.</p><p>Please Email the support Engineer listed below with your concerns:</p><table border='1'><tr><th>Name</th><th>Email</th></tr><tr><td>Engineer</td><td><a href='mailto:Engineer1@provaltech.com'>Engineer1@provaltech.com</a></td></tr><tr><td>Engineer2</td><td><a href='mailto:Engineer2@provaltech.com'>Engineer2@provaltech.com</a></td></tr></table></body></html>" -l -i "https://clipartcraft.com/images/anime-transparent-aesthetic-2.png" -h "https://www.pngmart.com/files/13/One-Punch-Man-Saitama-PNG-Picture.png" -t "HTML Prompt" -b OK -e Light
#HTML Formatted message with an URL, a Table, and mailto: addresses.
$prompterOutput[0]
# Will be OK

Example 5

Example 6

$prompterOutput = .\Prompter.exe -m "We would greatly appreciate it if you could take the time to provide us with your valuable feedback on our support.\nPlease type your feedback in the text box below and select a satisfaction rating using a scale of 1 to 5, with 1 being the lowest and 5 being the highest." -i "https://clipartcraft.com/images/anime-transparent-aesthetic-2.png" -h "https://www.pngmart.com/files/13/One-Punch-Man-Saitama-PNG-Picture.png" -t "Feedback Prompt" -b 1 2 3 4 5 -e Light -u -x "We value your feedback. Please take a moment to share your thoughts in this text box."
#Enables the Text Box for the user's input.
$prompterOutput[0]
# Will be 5
$PrompterOutput[1]
#I wanted to take a moment to express my sincere gratitude for the outstanding support consistently provided by the engineer at ProVal. Each time I've reached out for assistance, your expertise, professionalism, and dedication have been remarkable. Your swift responses and thorough solutions have not only resolved my issues efficiently but have also greatly enhanced my understanding of the systems. Your unwavering commitment to delivering top-notch service is truly commendable and makes a significant difference in our operations. Thank you for always going above and beyond to ensure our success.

Example 6

Example 6

Acknowledgments

Changelog

2026-05-12

  • Updated the application to automatically support newer .NET versions (like .NET 9 and 10), ensuring long-term stability and preventing future disruptions.

2025-05-06

  • Initial version of the document