PDA

View Full Version : Install driver finish then show a Dialog Message....



porsha
11-14-2006, 03:38 AM
Hello everyone,

i have a question.

i need to install "two" driver when i click one link.
----install the "first" driver. when the install finish then show a Dialog Message. →I don't know how to do this. (when install finish then show the Dialog Message)
The "Dialog Message" have two button (Yes/No).
when I click "Yes" then "second" driver start install (I can do this).

i don't know how to control the "Dialog Message" time.


(i'm very sorry about my english, i'm come from Taiwan"

Many thanks

longedge
11-14-2006, 05:38 AM
Hello,

The attached project might help. Everything is in the button 'on click' event.

I'm not sure what you mean when you refer to the "dialog message time". The dialogue box stays open until the user has answered the question that you want answered.

porsha
11-14-2006, 07:03 PM
thank you, longedge.
i should say, i don't know how to control the show time when "Dialog Message" show. (hope someone can understand my poor english:rolleyes )
i want to install two .exe file.
when I finished the first install "setup.exe", then the dialog message show.
If i click "yes" button then the second install "dotnetfx.exe" start.
(program file exit when i click "no" button)

But i don't know how to control this.
When I open "setup.exe" , the "setup.exe" & "Dialog Message" show at same time.:huh


File.Open("AutoPlay\\Docs\\utility\\setup.exe", "", SW_SHOWNORMAL);
result = Dialog.Message("Notice", "The utility need Microsoft .NET Framework to work properly. If you have already installed it, you can skip to install .NET Framework. Or you are not sure for your system, please install the Microsoft .NET Framework 1.1 here.", MB_YESNO, MB_ICONQUESTION, MB_DEFBUTTON1);
Yes = true
No = false
if true then
result = File.Run("AutoPlay\\Docs\\dotnetfx.exe", "", "", SW_MAXIMIZE, false);
end
if false then
Application.Exit();
end

longedge
11-15-2006, 01:25 AM
I think I understand now, try using the File.Run action in your first line instead of File.Open.

You'll see that you can set a "wait_for_return" parameter which you can test for in an if statement if necessary.

p.s. If you downloaded my example, the code behind the button will show how to test user input from a dialogue box.

porsha
11-17-2006, 12:36 AM
thank you.
you gave me some useful information.

thank you so much.