/build/static/layout/Breadcrumb_cap_w.png

Call a Custom Dialog from VBSCript

[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

Answers (25)

Posted by: anonymous_9363 15 years ago
Red Belt
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.
Posted by: vijayakumar 15 years ago
Orange Belt
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.
Posted by: anonymous_9363 15 years ago
Red Belt
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... :)
Posted by: vijayakumar 15 years ago
Orange Belt
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.
Posted by: anonymous_9363 15 years ago
Red Belt
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.
Posted by: vijayakumar 15 years ago
Orange Belt
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"]
Posted by: anonymous_9363 15 years ago
Red Belt
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.
Posted by: vijayakumar 15 years ago
Orange Belt
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"]
Posted by: AngelD 15 years ago
Red Belt
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")
Posted by: vijayakumar 15 years ago
Orange Belt
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.
Posted by: anonymous_9363 15 years ago
Red Belt
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.
Posted by: vijayakumar 15 years ago
Orange Belt
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?
Posted by: anonymous_9363 15 years ago
Red Belt
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.
Posted by: aogilmor 15 years ago
9th Degree Black Belt
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....
Posted by: vijayakumar 15 years ago
Orange Belt
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.
Posted by: AngelD 15 years ago
Red Belt
0
Second with you Owen!
I was too focused on giving a solution using vbscript.
Posted by: vijayakumar 15 years ago
Orange Belt
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.
Posted by: AngelD 15 years ago
Red Belt
0
Add the custom action to the InstallExecuteSequence table instead of InstallUISequence.
Condition the CA for your needs, ex. NOT PATCH.
Posted by: vijayakumar 15 years ago
Orange Belt
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.
Posted by: AngelD 15 years ago
Red Belt
0
Try [font="trebuchet ms"]'Installed And NOT PATCH' instead.
[font="trebuchet ms"]
Posted by: vijayakumar 15 years ago
Orange Belt
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"]
Posted by: vijayakumar 15 years ago
Orange Belt
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.
Posted by: anonymous_9363 15 years ago
Red Belt
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.
Posted by: vijayakumar 15 years ago
Orange Belt
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.
Posted by: anonymous_9363 15 years ago
Red Belt
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!
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ