Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / Setup / May 2004

Tip: Looking for answers? Try searching our database.

vs.net setup project: error handling for fields in custom textboxes dialog

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
konsu - 05 May 2004 01:09 GMT
hello,

i have a vs.net setup project that uses the Textboxes custom dialog.

1. in response to the user pressing, say, the "next" button i would like to
verify the contents of the text fields that the user has entered.
2. if the contents are invalid, i would like the user to be able to fill in
the fields again before going to the next dialog in the UI sequence.

is it possible?

thanks
konstantin
Phil Wilson - 06 May 2004 00:47 GMT
Not directly with a VS setup project, no. You need a custom action firing
off the Next button and VS doesn't have IDE support for that. Other tools
can build that kind of thing (and you could do it with the Windows Installer
SDK but it would be a lot of work). The documentation that comes closest to
that is here:
http://support.microsoft.com/default.aspx?scid=kb;en-us;253683
Signature

Phil Wilson [MVP Windows Installer]
----

> hello,
>
[quoted text clipped - 9 lines]
> thanks
> konstantin
konsu - 07 May 2004 00:56 GMT
Phil, thanks for the response.

I created a custom action similar to that in the documentation that you
referred to and it worked.

the only drawback of the provided sample was that it used MessageBox api to
display an error to the user, which would show underneath of the main msi UI
because it has no parent window. since i found no way to obtain the parent
from the msi, I decided to use MsiProcessMessage to show my error message:

   PMSIHANDLE hrecord = MsiCreateRecord(1);
   if (hrecord == NULL || MsiRecordSetInteger(hrecord, 1, 25001) !=
ERROR_SUCCESS)
   {
       return ERROR_INSTALL_FAILURE;
   }
   MsiProcessMessage(hinstall,
INSTALLMESSAGE(INSTALLMESSAGE_ERROR|MB_OK|MB_ICONERROR), hrecord);

where 25001 is the ID of the error that i manually put into the Error table.

but this does not show any message box and simply follows the UI sequence as
if i called no MsiProcessMessage. the verbose log shows no message at all
also. looks like it cannot find the error message because deleting my error
row from the Error table makes no difference. why?

would appreciate any help!

konstantin

> Not directly with a VS setup project, no. You need a custom action firing
> off the Next button and VS doesn't have IDE support for that. Other tools
[quoted text clipped - 17 lines]
> > thanks
> > konstantin
Phil Wilson - 09 May 2004 19:36 GMT
I'm not sure why your MessageBox has that behavior in the UI sequence, but
it might be related to the OS version you're using.
That MsiCreateRecord doesn't look right to me. You need two fields, not one,
field 0 probably empty and field 1 your error number.
Signature

Phil Wilson
[MVP Windows Installer]
Definitive Guide to Windows Installer
http://apress.com/book/bookDisplay.html?bID=280

> Phil, thanks for the response.
>
[quoted text clipped - 49 lines]
> > > thanks
> > > konstantin

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.