Skip to content
View in the app

A better way to browse. Learn more.

MSFN

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Tiny command line utility msgbox.exe with timeout option

Featured Replies

I searched for such tool but did not find so I wrote myself. Maybe some of you can make use of this tiny tool

Features:

- standard styles (yes/no, ok/cancel, abort/retry,...) and icons

- selectable default button with timeout option

- only 1KB

Download: msgbox.cab

  • Author

oh the old good WBAT :wub: . Just forgotten

OK I got the message boxes but n00b question:

How do i use the choices? meaning when i select OK or Cancell how do I use the number to go to a choice?

  • Author

use errorlevel, for example:

 msgbox "Setup will continue in %%d seconds." "Setup" 65 15
if errorlevel 2 goto :cancel

rem *** put your stuff here in case the user clicks on OK or timed out ***

:cancel

Here are the errorlevels returned:

0 Timed out

1 OK

2 Cancel

3 Abort

4 Retry

5 Ignore

6 Yes

7 No

You can also use %ERRORLEVEL% as environment variable, i.e.

if "%ERRORLEVEL%"=="5" goto :ignore

if "%ERRORLEVEL%"=="4" goto :retry

if "%ERRORLEVEL%"=="3" goto :abort

Edited by phan

:yes: wonderful my friend. thank u very much. ive been looking for this kind of app to execute cmds based on the user interest. u have fulfilled my interest. :thumbup

Youve just got my 200th post. :whistle:

Edited by rajesh.kumar

  • Author

thank u all :wub:

@rajesh: I'll wait for ur 999th post :rolleyes:

btw, note on the double percent sign %%d above: this is because calling in cmd-file. If you run msgbox from other program, use only one percent sign %d (like printf())

And the number 65 in the example above is sum of 1+64 (OK Cancel + Information Icon). You may combine following box styles:

Buttons:

0 OK

1 OK Cancel

2 Abort, Retry, Ignore

3 Yes, No, Cancel

4 Yes, No

5 Retry, Cancel

Icon:

16 Error

32 Question

48 Exclamation

64 Information

Default button:

256 make 2nd button default

512 make 3rd button default

  • 3 months later...
Buttons:

0 OK

1 OK Cancel

2 Abort, Retry, Ignore

3 Yes, No, Cancel

4 Yes, No

5 Retry, Cancel

The first param is the messagebox text, the second is the window title, third is the sum of the buttons + icon + default, fourth is the timeout in seconds.

  • 1 month later...

Could you add a switch to always return errorlevel 0. I would like to use msgbox.exe as a program in MS SMS, and errorlevel <> 0 cause a stop.

thanx for an excellent program

  • 1 year later...

Msgbox.exe - virus alert ???

My Avira Personal Antivirus send alarm when unpacking msgbox.cab

True virus ???

msgbox.cmd contains the text "format c:" - try changing that to something else and scan the extracted files again?

virustotal.com seems busy at the moment.

Please sign in to comment

You will be able to leave a comment after signing in

Sign In Now

Recently Browsing 0

  • No registered users viewing this page.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.