Click here to Skip to main content
Click here to Skip to main content
Go to top

A standalone messagebox (good for user interaction during the install process of your application)

, 10 Nov 2005
Rate this:
Please Sign up or sign in to vote.
ShowArgs displays a MessageBox and reads the parameter from command line.

Introduction

The VS2003 implementation of the MSI installer is not as flexible as we developers think...

If you like to (or have to) interact with your user during the installation process you can use the built-in dialog boxes of VS. But these dialog boxes are very limited. If you have to do something special (e.g. tell you user to plug in his USB connector to start the USB plug and play) you have to start a custom action in VS.

ShowArgs is a little EXE program, which displays a MessageBox(). In the command line you can specify what the message box should display: title, prompt text, icon, buttons etc. (Of course, you can customize ShowArgs to do much more, if you want to.)

Usage

Call ShowArg.exe at command line or as custom actions in VS with the following args:

  • /b_ok MessageBoxButtons.OK
  • /b_okcancel MessageBoxButtons.OKCancel
  • /b_abortretryignore MessageBoxButtons.AbortRetryIgnore
  • /b_retrycancel MessageBoxButtons.RetryCancel
  • /b_yesno MessageBoxButtons.YesNo
  • /b_yesnocancel MessageBoxButtons.YesNoCancel
  • /i_information MessageBoxIcon.Information
  • /i_hand MessageBoxIcon.Hand
  • /i_asterisk MessageBoxIcon.Asterisk
  • /i_error MessageBoxIcon.Error
  • /i_exclamation MessageBoxIcon.Exclamation
  • /i_none MessageBoxIcon.None
  • /i_question MessageBoxIcon.Question
  • /i_stop MessageBoxIcon.Stop
  • /i_warning MessageBoxIcon.Warning
  • /c "caption text" Title
  • "prompt text" Message

The return value of ShowArgs is the DialogResult value of MessageBox.Show() function, 0 (zero) for Yes and OK.

Example

The following dialog box is the result of the line: ShowArgs.exe /b_ok /i_information /c "Title" "Line 1\nLine 2\nSucess!".

Enjoy!

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here

Share

About the Author

Ariadne
Software Developer (Senior) EndoTherm GmbH
Switzerland Switzerland
My first approach to computers was in 1970 a IBM1160, a real desk computer, this means it was as large as a desk and had a cartreader and 32 kByte Memory! But it runs FORTRAN! Ok 'run' is a little too fast

Later I was very proud on my Comodore CBM8032 32KbRAM+32KbRom (uff!) and 2 (in words 'TWO') floppies. But it was able to run a Basic-Interpreter. (There was a young gay in USA, who invent and developed the garbage collecter for such interpreter, his name was Bill G.)

Unfortunatly this CBM8032 burned away due to some "experiements"...

Ok, later I studied physics and work now since 20 years in the cancer research in Switzerland. My own little company Ariadne-Consulting delivers the login name:

Ariadne


Comments and Discussions

 
-- There are no messages in this forum --
| Advertise | Privacy | Mobile
Web01 | 2.8.140926.1 | Last Updated 10 Nov 2005
Article Copyright 2005 by Ariadne
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid