vbscript not getting current property... - Advanced Installer Community

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!

varopt
Posts: 3
Joined: Tue Oct 14, 2008 8:16 pm

vbscript not getting current property...

Advanced Installer v6.6 Enterprise

I am hoping someone can help a newbie. I have a dialog modifying a bunch of properties from their initial values. The log file on a run and log shows what I expect and is as follows:
MSI (c) (00:A8) [15:24:04:132]: PROPERTY CHANGE: Modifying PrimaryDB_DBName property. Its current value is 'it'. Its new value: 'pratest'.
MSI (c) (00:A8) [15:24:06:112]: PROPERTY CHANGE: Modifying PrimaryDB_TempDirectory property. Its current value is 'C:\temp'. Its new value: 'C:\temp\'.
MSI (c) (00:A8) [15:24:11:328]: PROPERTY CHANGE: Modifying PrimaryDB_Service property. Its current value is 'reacct'. Its new value: 'reacctpra'.

I have a custom action that runs a vbscript on InstallFinalize set for 'Asynchronous execution, wait for return code at the end of the sequence,' 'Immediate execution,' and 'Always Execute' that generates a file from the user-entered properties. The problem is that the file *always* shows the initial values of the properties and not the ones the user changed. What am I doing wrong?

Regards,
K.
varopt
Posts: 3
Joined: Tue Oct 14, 2008 8:16 pm

Re: vbscript not getting current property...

Okay... so I figured this one out by avoiding the InstallFinalize and putting the actions in the UI Custom Actions section and calling the Action from the Finish button of the Exit Dialog, but I have yet another issue. Those user-modified properties are not showing up in the shortcuts that get created in the application directory and the desktop. So the Files and Folders->Application Shortcut Folder has a Shortcut defined with shortcut target of [Directory_DLC] --a properties set in a dialog.

When the shortcuts are created, they are always created with the default/initial value of the property.
varopt
Posts: 3
Joined: Tue Oct 14, 2008 8:16 pm

Re: vbscript not getting current property...

Well, hey... while I am on a roll I'll answer my own second question. It seems like there is only a small subset of properties allowed for the shortcuts (et al) because of the way MSIs work.

http://www.advancedinstaller.com/user-g ... rties.html

Thanks for all your help.
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: vbscript not getting current property...

Hi,

Indeed, the problems you encountered are caused by private properties. This type of properties cannot pass their values from the UI sequence (when the dialogs are shown) to the execute sequence (when the actual install process runs). Therefore, the modified values of the private properties cannot be passed to the install process, when the files and shortcuts are created.

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

Return to “Common Problems”