[font="trebuchet ms"]How do i call a Custom Dialog from a VB Script CA? I would like to know the object(syntax) to call a dialog.
[font="trebuchet ms"]
[font="trebuchet ms"]I m using Basic MSI project.
[font="trebuchet ms"]
0 Comments   [ + ] Show Comments

Comments

Please log in to comment

Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.

Answers

0
Did you delete a post from a few days ago on this exact same subject, to which I responded? I think I even pasted a link to some script on JSWare, didn't I?

Anyway...I couldn't say for sure but I doubt you could call the dialogs from within the MSI without some strangulated coding. As an alternative, you can use IE and HTML to build dialogs. Here http://www.jsware.net/jsware/scrdex.php3 is a whole raft of script code, some of which demonstrates how you can use IE as a 'container' to build dialogs.
Answered 06/12/2008 by: VBScab
Red Belt

Please log in to comment
0
[font="trebuchet ms"]Hello Ian,
[font="trebuchet ms"]
[font="trebuchet ms"]Thanks for the suggestion. I will go thru the link and try if it can be useful.
[font="trebuchet ms"]
[font="trebuchet ms"]I didnt post any query related to this thread. Also i am also not aware of this JSWare earlier. Might be you could have mistaken my name with that thread starter(the one u said).
[font="trebuchet ms"]
[font="trebuchet ms"]Thanks.
Answered 06/12/2008 by: vijayakumar
Orange Belt

Please log in to comment
0
ORIGINAL: vijayakumar
[font="trebuchet ms"]Thanks for the suggestion. I will go thru the link and try if it can be useful.
The beauty is that anything that can be displayed by IE, you can add to your 'dialog'. There are some superb examples around on the web. Bear in mind, though, that some of them require support files (e.g. JavaScript script files) which you would need to include in your package. Even if you keep it to simple HTML, though, you can achieve some spectacular results.

Apologies for the 'post deletion' question: it's been a long week... :)
Answered 06/12/2008 by: VBScab
Red Belt

Please log in to comment
0
[font="trebuchet ms"]Thanks Ian. I just want to display a text (as in msgbox) in the dialog. So, thought would be fine if it works with VBscript(??).
[font="trebuchet ms"]
[font="trebuchet ms"]Also, i am not sure whether i can add some files to support the dialog(should ask permission).

[font="trebuchet ms"]Anyway, i will try with that and see if i can do what i need.

[font="trebuchet ms"]Meanwhile, if there is any suggestion related to my problem, I am most thankful.
[font="trebuchet ms"]
[font="trebuchet ms"]@Ian, that's ok. I understand that u reply to a lot of threads, so its obvious that u couldn't remember.
Answered 06/12/2008 by: vijayakumar
Orange Belt

Please log in to comment
0
ORIGINAL: vijayakumar
[font="trebuchet ms"]I just want to display a text (as in msgbox) in the dialog. So, thought would be fine if it works with VBscript(??).
...in which case, check out the 'Custom MsgBox class' example.
Answered 06/12/2008 by: VBScab
Red Belt

Please log in to comment
0
[font="trebuchet ms"]I think i can directly use a Custom dialog and then execute CA, instead of calling a dialog from a Custom Action.
[font="trebuchet ms"]
[font="trebuchet ms"]Can u pls tell me whether it is possible to display the text in a dialog based on some condition?
[font="trebuchet ms"]
[font="trebuchet ms"]Say for install, uninstall and repair the text should be different.
[font="trebuchet ms"]
[font="trebuchet ms"]Can this be achieved?
[font="trebuchet ms"]
[font="trebuchet ms"]Thanks.
[font="trebuchet ms"]
Answered 06/12/2008 by: vijayakumar
Orange Belt

Please log in to comment
0
ORIGINAL: vijayakumar
[font="trebuchet ms"]Can this be achieved?
Yes. Open practically any MSI and you'll see that the text for certain controls on dialogs is conditioned, particularly the maintenance ones.
Answered 06/12/2008 by: VBScab
Red Belt

Please log in to comment
0
[font="trebuchet ms"]Yes, I am able to set conditions for the text on the dialog.
[font="trebuchet ms"]
[font="trebuchet ms"]Thanks Ian[font="trebuchet ms"].
[font="trebuchet ms"]
Answered 06/12/2008 by: vijayakumar
Orange Belt

Please log in to comment
0
How about using the DoAction method to execute the dialog from within a vbscript custom action.
Have a look at http://msdn.microsoft.com/en-us/library/aa371653.aspx

ex.
Dim msiDoActionStatus
msiDoActionStatus = Session.DoAction("MyCustomDialog")
Answered 06/13/2008 by: AngelD
Red Belt

Please log in to comment
0
[font="trebuchet ms"]Yes, Seems that this does what i need.
[font="trebuchet ms"]
[font="trebuchet ms"]I tried this in my msi. The dialog is getting called. But the script is not waiting for the dialog to be closed. Rather, it just pops up this dialog and continues with the next steps.
[font="trebuchet ms"]
[font="trebuchet ms"]Is there a way to get the handle of the open dialog? That is, the script should proceed only if this dialog is closed.
[font="trebuchet ms"]
[font="trebuchet ms"]Thanks.
Answered 06/17/2008 by: vijayakumar
Orange Belt

Please log in to comment
0
My guess is that your script isn't testing the return value from the dialog. Refer back to the MS article for the possible values.
Answered 06/17/2008 by: VBScab
Red Belt

Please log in to comment
0
[font="trebuchet ms"]When i checked the return value, the dialog returns 1, always.
[font="trebuchet ms"]The Custom dialog which i m showing has 2 buttons, 'Re-try' and 'Cancel'.
[font="trebuchet ms"]But even without clicking on any buttons, i m not sure how this returns 1.
[font="trebuchet ms"]
[font="trebuchet ms"]How should i make the CA from executing further?
Answered 06/17/2008 by: vijayakumar
Orange Belt

Please log in to comment
0
A quick thought...is the dialog set to be modal? Modal dialogs sit and wait for input of some kind, whereas modeless dialogs don't. A modal dialog's 'Attribute' in the Dialog table with the remaining options set as their defaults will be 71, whereas a modeless one's 'Attribute' will be 69.
Answered 06/17/2008 by: VBScab
Red Belt

Please log in to comment
0
ORIGINAL: VBScab

ORIGINAL: vijayakumar
[font="trebuchet ms"]Can this be achieved?
Yes. Open practically any MSI and you'll see that the text for certain controls on dialogs is conditioned, particularly the maintenance ones.



Ian, I was going to suggest that...If one is interested in building dialogs (something not done too much in the corporate deployment environment) just use the built-in MSI dialogs with conditions, why mess with vbscript? It's just another thing to break....
Answered 06/17/2008 by: aogilmor
Ninth Degree Black Belt

Please log in to comment
0
[font="trebuchet ms"]Ian:
[font="trebuchet ms"]Yes, Thanks for the valuable information.
[font="trebuchet ms"]
[font="trebuchet ms"]I am not aware of this modal and modeless dialogs earlier. When i set it as Modal, the installer waits for the input.
[font="trebuchet ms"]
[font="trebuchet ms"]Owen:
[font="trebuchet ms"]Thanks for the suggestion, i just made some changes in the msi and its working fine.
Answered 06/17/2008 by: vijayakumar
Orange Belt

Please log in to comment
0
Second with you Owen!
I was too focused on giving a solution using vbscript.
Answered 06/18/2008 by: AngelD
Red Belt

Please log in to comment
0
[font="trebuchet ms"]Hi All,
[font="trebuchet ms"]
[font="trebuchet ms"]I am using Session.DoAction("<Dialog>") to display the Custom Dialog during my execution from VBS Custom Action. Everything works fine during installation. But, when i uninstall the appl. from ARP, this dialog is not displaying.
[font="trebuchet ms"]I am aware that during uninstall from ARP, the installer runs in silent mode '/qb'.
[font="trebuchet ms"]
[font="trebuchet ms"]Is there a way that i can display this dialog during uninstall and repair also.
[font="trebuchet ms"]
[font="trebuchet ms"]Thanks.
Answered 06/18/2008 by: vijayakumar
Orange Belt

Please log in to comment
0
Add the custom action to the InstallExecuteSequence table instead of InstallUISequence.
Condition the CA for your needs, ex. NOT PATCH.
Answered 06/18/2008 by: AngelD
Red Belt

Please log in to comment
0
[font="trebuchet ms"]Yes, the CA is places in InstallExec Sequence only. Condition is set as 'Installed and NOT PATCH'.
[font="trebuchet ms"]
[font="trebuchet ms"]Actually the CA gets executed but, the Session.DoAction("<Custom Dialog>"), doesnt pop up the expected dialog. Rather, when this statement is executed, the installer quits without any msg.
Answered 06/18/2008 by: vijayakumar
Orange Belt

Please log in to comment
0
Try [font="trebuchet ms"]'Installed And NOT PATCH' instead.
[font="trebuchet ms"]
Answered 06/18/2008 by: AngelD
Red Belt

Please log in to comment
0
Try 'Installed And NOT PATCH' instead

[font="trebuchet ms"]If 'A' in And is the difference in the one you said, thats not working too. I tried it.
[font="trebuchet ms"]
[font="trebuchet ms"]Thanks.
[font="trebuchet ms"]
[font="trebuchet ms"]
Answered 06/18/2008 by: vijayakumar
Orange Belt

Please log in to comment
0
[font="trebuchet ms"]To add to my post, I believe uninstalling from ARP, executes the uninstallation wit h'/qb' switch. If i am not wrong, installshield dialogs cant be shown during InstallExec sequence(Also, i tried to add a dialog in Exec sequence directly, but there is no option like adding the dialogs.
[font="trebuchet ms"]
[font="trebuchet ms"]So, i guess there should be a workaround for this(as this seems to be a common problem). As of my knowledge, there are some workarounds like showing a VBScript pop-ups or MsgBox. But it'd be better if msgbox's can be avoided in a release product.
[font="trebuchet ms"]
[font="trebuchet ms"]If there is any solution to this, would be very much helpful.
[font="trebuchet ms"]
[font="trebuchet ms"]Thanks.
Answered 06/18/2008 by: vijayakumar
Orange Belt

Please log in to comment
0
ORIGINAL: vijayakumar
[font="trebuchet ms"]Is there a way that i can display this dialog during uninstall and repair also.
I think you may have to go either with a custom DLL with dialog resources or with my original thought, i.e. using IE as a 'wrapper'. Not ideal but certainly more flexible than MsgBox.
Answered 06/18/2008 by: VBScab
Red Belt

Please log in to comment
0
[font="trebuchet ms"]Thanks Ian.
[font="trebuchet ms"]
[font="trebuchet ms"]I will look out for the possibility of creating a custom dll which serves my purpose. [font="trebuchet ms"]Just want to know, if language specific strings can also be displayed in Custom Dlls. Also, if there is any specific point to keep in mind while creating dlls(like win32), that might be of use.
Answered 06/18/2008 by: vijayakumar
Orange Belt

Please log in to comment
0
VJ, if you're asking those questions, you have a MAJOR uphill battle, involving creating resource files with localisation and incorporating those into your DLL, just for starters.

In your position, I'd d/l a freeware HTML editor (if you're unfamiliar with building HTML pages) and creating a "dialog" from that and then using that code as a base for using IE as your dialog "host". That route has a learning curve too but NOWHERE near as steep as DLL creation from scratch!
Answered 06/19/2008 by: VBScab
Red Belt

Please log in to comment
Answer this question or Comment on this question for clarity