MSI code variable to VBScript

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

MSI code variable to VBScript

Post by markoh3 »

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: 5361
Joined: Sun Aug 22, 2010 4:28 am

Re: MSI code variable to VBScript

Post by FrancescoT »

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

Post by markoh3 »

Hi Francesco,

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

Regards,

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

Re: MSI code variable to VBScript

Post by FrancescoT »

... 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

Post by markoh3 »

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: 5361
Joined: Sun Aug 22, 2010 4:28 am

Re: MSI code variable to VBScript

Post by FrancescoT »

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
Post Reply