BobCrothers
Posts: 66
Joined: Wed Dec 05, 2007 10:58 pm

Where is the documentation for this version of Visual Basic

Hi,

This is a great forum, it is extremely helpful.

I’m a newbie. I want to have a custom action which does property file configuration after the program has been installed. I have been testing this idea by adding a Visual Basic script custom action to/after the install. The script is very simple, it displays a MsgBox with the results of Session.Property("CustomActionData"). This seems okay. I have several related questions.

1) What version of Visual Basic is this? We have Advanced Installer version 6.0.1. I have copied code from sample Visual Basic 2005 files which does NOT work/compile in the vbs scripts. Where is the documentation for this version of Visual Basic? I saw one message which says Advanced Installed does not use the Windows Script Host. What does it use?

2) How do I find documentation on Session? I copied the Session.Property("CustomActionData") from one of the forum questions, but I don’t see documentation on Session. What other functions exist on Session that I can call?


Thanks,
Bob
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Hi,
1) What version of Visual Basic is this? We have Advanced Installer version 6.0.1. I have copied code from sample Visual Basic 2005 files which does NOT work/compile in the vbs scripts. Where is the documentation for this version of Visual Basic? I saw one message which says Advanced Installed does not use the Windows Script Host. What does it use?
Note that Windows Installer does not use a version of Visual Basic, it uses Visual Basic Scripting for VBScript custom actions. You can read more about this here:
http://msdn2.microsoft.com/en-us/library/t0aew7h6.aspx
http://msdn2.microsoft.com/en-us/library/aa368241.aspx
http://msdn2.microsoft.com/en-us/library/aa368089.aspx
http://msdn2.microsoft.com/en-us/library/aa372048.aspx
2) How do I find documentation on Session? I copied the Session.Property("CustomActionData") from one of the forum questions, but I don’t see documentation on Session. What other functions exist on Session that I can call?
You can read more about the "Session" object here:
http://msdn2.microsoft.com/en-us/library/aa371675.aspx

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
BobCrothers
Posts: 66
Joined: Wed Dec 05, 2007 10:58 pm

Thanks Cosmin this helps tremendously.

I’d like to ask two more questions. I notice when there is an error, I always get the same error message, “A script required for this install to complete could not be run.” If I use the run log I don’t see any useful information. Is there a way to get more debug information when a VBScript fails, something like the line number where the error occurred? Now that I know I’m working with VBScript, I down loaded VbsEdit to create the scripts in. When I run the script from VbsEdit, everything with the session gets an error. Is there someway to run the scripts from Advanced Installer and debug in VbsEdit or make VbsEdit aware of the session?

Thanks, you have been a big help,
Bob
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Hi,
I notice when there is an error, I always get the same error message, “A script required for this install to complete could not be run.” If I use the run log I don’t see any useful information. Is there a way to get more debug information when a VBScript fails, something like the line number where the error occurred?
I'm afraid that you cannot get this kind of information because the error is triggered by a custom action, not by something controlled by Windows Installer.

Usually the information in the log just lets you know which custom action fails (the one that returns the value "3").
Is there someway to run the scripts from Advanced Installer and debug in VbsEdit or make VbsEdit aware of the session?
I'm afraid that you cannot debug a VBScript by using Advanced Installer. Also, please note that the Session object is available only when a VBScript is run as a part of an installation, therefore it cannot be available in VBSEdit.

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
BobCrothers
Posts: 66
Joined: Wed Dec 05, 2007 10:58 pm

Cosmin, you are full of good news.

Thanks for the info
Bob

Return to “Common Problems”