MSI code variable to VBScript

Got a problem you cannot solve? Try here.
markoh3
Posts: 11
Joined: Mon Mar 03, 2014 2:52 am

MSI code variable to VBScript

Postby markoh3 » Fri Apr 04, 2014 4:58 am

Hi,

Is it possible to use a MSI code variable in a VBScript?
If this is possible how should I handle this?

Kind regards,

Marko

FrancescoT
Site Admin
Posts: 5122
Joined: Sun Aug 22, 2010 4:28 am

Re: MSI code variable to VBScript

Postby FrancescoT » Fri Apr 04, 2014 10:21 am

Dear Marko,

how do you integrate the VB script with your project?

If it is an external file that you execute from the setup, you could pass an IA Variable to it as you do from command line.

Regards
Francesco Toscano
InstallAware Software

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE

markoh3
Posts: 11
Joined: Mon Mar 03, 2014 2:52 am

Re: MSI code variable to VBScript

Postby markoh3 » Mon Apr 07, 2014 1:13 am

Hi Francesco,

The VBscript is integrated within the project as a support file.

Regards,

Marko

FrancescoT
Site Admin
Posts: 5122
Joined: Sun Aug 22, 2010 4:28 am

Re: MSI code variable to VBScript

Postby FrancescoT » Mon Apr 07, 2014 10:22 am

... you could pass an IA Variable to it as command line parameter (using the RUN PROGRAM command).

Regards
Francesco Toscano
InstallAware Software

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE

markoh3
Posts: 11
Joined: Mon Mar 03, 2014 2:52 am

Re: MSI code variable to VBScript

Postby markoh3 » Tue Apr 08, 2014 12:29 am

Hi Francesco,

Thank you for your reply.
Do you have an example how I could do this in MSI-code. I will try it by myself as well but it would be nice to see an example.

Regards,

marko

FrancescoT
Site Admin
Posts: 5122
Joined: Sun Aug 22, 2010 4:28 am

Re: MSI code variable to VBScript

Postby FrancescoT » Tue Apr 08, 2014 11:02 am

Dear Marko,

it really simple ...

Code: Select all

Set Variable MYVAR to 1234
Run Program $SUPPORTDIR$\myscript.vbs $MYVAR$ (WAIT)

The above example excutes the vbscript "myscript.vbs" (from SupportDir at runtime ) and pass an IA Variable to it as command line parameter.

The same code snippet as IA clipboard format;

Code: Select all

~InstallAware Clipboard Data~
~Run Program~
~{CDF79D0B-FAF1-4374-8DA4-382F32ADBFFE}~
~$SUPPORTDIR$\myscript.vbs~
~TRUE~
~$MYVAR$~
~TRUE~
~~
~Set Variable~
~{8E58E9BD-05BB-432E-A15B-70FA32EFBFE1}~
~MYVAR$MYAH$MYAH$FALSE~
~1234~

Hope this helps you.

Regards
Francesco Toscano
InstallAware Software

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE


Return to “Technical Support”

Who is online

Users browsing this forum: No registered users and 16 guests