[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.dotnet.framework.setup

Problem(small but annoying) when using custom c++ dll.

Oleg

3/31/2006 8:08:00 PM

Hi,

Trying to implemnet a password with custom c-style dll.
as mentioned in :

http://support.microsoft.com/default.aspx?scid=kb;en...
and
http://www.devasp.net/net/search/redirect.asp...

Everything is working except when verification fails by dll dialog box
appears at the back of main dialog instead of to be in front.

Running .msi found in second link works properly though.
What can cause it? I was trying to do some setings with ORCA only to no avail.

Any input would be appreciated,
Oleg
7 Answers

Phil Wilson

4/1/2006 10:01:00 PM

0

The SetForegroundWindow Function might help.
--
Phil Wilson
[Microsoft MVP-Windows Installer]

"Oleg" <Oleg@discussions.microsoft.com> wrote in message
news:A816FE3E-7711-4E59-915F-CBC54C7B88B5@microsoft.com...
> Hi,
>
> Trying to implemnet a password with custom c-style dll.
> as mentioned in :
>
> http://support.microsoft.com/default.aspx?scid=kb;en...
> and
> http://www.devasp.net/net/search/redirect.asp...
>
> Everything is working except when verification fails by dll dialog box
> appears at the back of main dialog instead of to be in front.
>
> Running .msi found in second link works properly though.
> What can cause it? I was trying to do some setings with ORCA only to no
> avail.
>
> Any input would be appreciated,
> Oleg


Oleg

4/3/2006 1:21:00 PM

0

Actually what happens is ..
first message appears at the back. I get to it and close it. put a new
invalid password and then it comes on top.

So, I'm thinking that some other task/test is being evaluated after dll
kicks in and therefore making installation dialog box come on top again and
message appears behind.

"Phil Wilson" wrote:

> The SetForegroundWindow Function might help.
> --
> Phil Wilson
> [Microsoft MVP-Windows Installer]
>
> "Oleg" <Oleg@discussions.microsoft.com> wrote in message
> news:A816FE3E-7711-4E59-915F-CBC54C7B88B5@microsoft.com...
> > Hi,
> >
> > Trying to implemnet a password with custom c-style dll.
> > as mentioned in :
> >
> > http://support.microsoft.com/default.aspx?scid=kb;en...
> > and
> > http://www.devasp.net/net/search/redirect.asp...
> >
> > Everything is working except when verification fails by dll dialog box
> > appears at the back of main dialog instead of to be in front.
> >
> > Running .msi found in second link works properly though.
> > What can cause it? I was trying to do some setings with ORCA only to no
> > avail.
> >
> > Any input would be appreciated,
> > Oleg
>
>
>

Oleg

4/6/2006 3:54:00 AM

0

I just noticed one thing.
It works fine for a regular Setup project, but misbehaves for Web setup
project.

Any ideas?


Phil Wilson

4/7/2006 3:31:00 PM

0

I think this will often be unpredictable because of the way custom actions
are called. They are often out-of-process COM calls being done on another
process. I'm not sure how a message box out of another process behaves in
all cases.When you say "it works fine" does that mean you called
SetForegroundWindow? That's what that API is for. Also, do you really need a
message box? A common way to deal with this is to disable the Next button
and put text on the dialog if you have a message. If you're using a Visual
Studio setup I can that might be tricky though.
--
Phil Wilson
[Microsoft MVP-Windows Installer]
Definitive Guide to Windows Installer
http://apress.com/book/bookDisplay.ht...

"Oleg" <Oleg@discussions.microsoft.com> wrote in message
news:AD7110E8-E0A8-44D4-B362-7C8B97EFC61C@microsoft.com...
>I just noticed one thing.
> It works fine for a regular Setup project, but misbehaves for Web setup
> project.
>
> Any ideas?
>
>


Oleg

4/11/2006 12:58:00 PM

0

Phil,
I really appreciate your effort.
I don't think that problem is the dll, because it works fine for "Setup
project". For it shows up on top all the time(especially first time).
In case of a "Web setup project" message box appear first time at the back
and all sequential times in front.
So, that was my summary of the problem.

On another hand, the whole thing takes just way too much time for seemingly
small problems and I doubt it's worth time to tweak and twist it when there
are other installation products available. They cost some money (or not), but
get things done in more timely fashion. What do you think about it?
Besides, I can't put on my resume that I worked on a message box for one
week. I just don't think it would work for me :)

Until next question,
Oleg

Phil Wilson

4/13/2006 5:28:00 PM

0

There's a lot of stuff in MSI, and it's specialized, somewhat like writing
drivers. The MSIAPI is pretty big, and it's not just that other products are
available to build MSI files, it's what you can do with the MSI API. The
official answer to getting a messagebox displayed properly out of a setup
seems to be to call MsiProcessMessage:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/msi/setup/sending_messages_to_windows_installer_using_msiprocessm...

and here:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/msi/setup/msiprocessm...

noting that you can send a message with certain buttons enabled or not. So
maybe your resume could say something about MessageBox not working from MSI
installs and how MsiProcessMessage is required - that would baffle
everybody!
--
Phil Wilson [MVP Windows Installer]
----
"Oleg" <Oleg@discussions.microsoft.com> wrote in message
news:54971F8C-40BF-468B-A10A-E759839AD38C@microsoft.com...
> Phil,
> I really appreciate your effort.
> I don't think that problem is the dll, because it works fine for "Setup
> project". For it shows up on top all the time(especially first time).
> In case of a "Web setup project" message box appear first time at the back
> and all sequential times in front.
> So, that was my summary of the problem.
>
> On another hand, the whole thing takes just way too much time for
> seemingly
> small problems and I doubt it's worth time to tweak and twist it when
> there
> are other installation products available. They cost some money (or not),
> but
> get things done in more timely fashion. What do you think about it?
> Besides, I can't put on my resume that I worked on a message box for one
> week. I just don't think it would work for me :)
>
> Until next question,
> Oleg
>


Phil Wilson

4/22/2006 12:16:00 AM

0

I did a bit of research on this. The official way to get a messagebox into a
Windows Installer setup is to use the MsiProcessMessage Win32 call in a
custom action - that's the way Windows would display a messagebox out of the
install. So your problem might go away if instead of a messagebox call you
do a MsiProcessMessage Win32 call:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/msi/setup/sending_messages_to_windows_installer_using_msiprocessm...
--
Phil Wilson [MVP Windows Installer]
----
"Oleg" <Oleg@discussions.microsoft.com> wrote in message
news:54971F8C-40BF-468B-A10A-E759839AD38C@microsoft.com...
> Phil,
> I really appreciate your effort.
> I don't think that problem is the dll, because it works fine for "Setup
> project". For it shows up on top all the time(especially first time).
> In case of a "Web setup project" message box appear first time at the back
> and all sequential times in front.
> So, that was my summary of the problem.
>
> On another hand, the whole thing takes just way too much time for
> seemingly
> small problems and I doubt it's worth time to tweak and twist it when
> there
> are other installation products available. They cost some money (or not),
> but
> get things done in more timely fashion. What do you think about it?
> Besides, I can't put on my resume that I worked on a message box for one
> week. I just don't think it would work for me :)
>
> Until next question,
> Oleg
>