We’re moving our forums to a new platform.

You can still browse and search existing topics, but you can no longer create new topics or post replies.

For questions, technical issues, or feature requests, please don’t hesitate to contact our support team at support@advancedinstaller.com.

Thank you for your understanding!

thomas.foin
Posts: 8
Joined: Fri Sep 09, 2011 3:23 pm

Run script during installation

Hi,

Is it possible to run script during the installation ?

Example : I want a script retrieves user properties (installation path, ...).

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

Re: Run script during installation

Hi Thomas,

Yes, Windows Installer supports VBScript custom actions. For example, you can add a .VBS file as a New Attached Custom Action.

To access properties inside your script you can use Session.Property. For example:

Code: Select all

dim myVar
myVar = Session.Property("PROPERTY_NAME")
Session.Property("PROPERTY_NAME") = myVar
Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
thomas.foin
Posts: 8
Joined: Fri Sep 09, 2011 3:23 pm

Re: Run script during installation

Hi,

I have problem with my script...

I sent an email to Bogdan who told me to do this: http://www.advancedinstaller.com/forums ... on+#p35732

But I still have the same problem. The error is: "Could not access VBScript run time for custom action"

I expect this problem before buying the software

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

Re: Run script during installation

Hi Thomas,

Did you try registering vbscript.dll like explained in that thread?

Please note that this is actually a Windows-related problem. There's not much you can do from Advanced Installer. On most machines vbscript.dll is configured correctly. If you want to be on the safe side, you can always use a win32 DLL instead of VBScript. Our user guide contains a sample C++ DLL custom action which may help you.

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Feature Requests”