Nico-D
Posts: 63
Joined: Mon Aug 18, 2008 2:34 pm

[vbs custom action] - Accessing system properties

Hi Cosmin,

It seems that I cannot access any system property (such as 'ProductLanguage' or 'Manufacturer') through a VBS CA attached to 'UI Custom Actions'. I try to access the system properties using:

Code: Select all

language = Session.Property("ProductLanguage")
and it dies invoking an error 2896 and no debug information. If I had a MsgBox debug message at the very first instruction of the vbs script, it is not displayed!

Moreover, note that I do not want to change the content of the variable, I just need to read it!

When accessing a user defined property using the same approach, everything is fine.

Do you have an opinion?

Best regards,
-- Nicolas D.
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: [vbs custom action] - Accessing system properties

Hi Nicolas,

I'm not sure why you are encountering this behavior (the properties should be available). Perhaps the custom action is not configured correctly. Can you please send us to support at advancedinstaller dot com a sample project with a sample custom action which shows this behavior so we can investigate the problem?

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Nico-D
Posts: 63
Joined: Mon Aug 18, 2008 2:34 pm

Re: [vbs custom action] - Accessing system properties

OK, I have sent the file, and Cosmin find the problem out: I forgot to declare the variable using 'DIM language" before affecting it.

Sorry for taking your time,
-- Nicolas D.

Return to “Common Problems”