Passing a variable from wise installation to wise script

vvbpavan's picture

Hi,

I would like to pass an variable (a string) to a wise script. I am calling the wise script from an msi.

Please send me the code snippets if possible.

thanks

EdT's picture

Set the string into a PUBLIC

Set the string into a PUBLIC property eg MYPROPERTY.
The use the Wisescript command "Get Windows Installer Property" to read the value of this property into a wisescript variable. This all assumes that you are using the integrated Wisescript editor in either Wise Package Studio or Wise Installation Studio. If you are using a separate "standalone" edition of Wisescript, then you will not have the "Get Windows Installer Property" command, and you will instead have to write your string into a registry key in the MSI and read it from the registry key using the wisescript.

If your issue has been solved, please use the "Mark as Solution" link on the most relevant thread.

vvbpavan's picture

i am using wise for windows

i am using wise for windows installer 5.1 and for script it is 9. now i could not set the public property string.

how can we make sure that an wise script is executed after an registry key is created.

thanks,
pavan

EdT's picture

More information would help

The less information you choose to share with us, the less likely you are to get a solution to your problem. Had you specified the version of tools you are using, I would not have wasted my time giving you an inappropriate solution.
Since you have not specified how you will be creating the registry key and what you want to do with the Wisescript, I think it would be easier for us to wait until you can give us a full and precise description of what you want to achieve.

Manwhile, you may want to read up on the %CMDLINE% variable supported by Wisescript, which allows you to pass a string to a Wisescript EXE by including it on the command line.

If your issue has been solved, please use the "Mark as Solution" link on the most relevant thread.

rpinder's picture

Wise 9.0.2 - simple feature question

Hello
Most installers have the option that after completion, the newly installed program can be RUN.
I see an option inside WISE to  'run external programs' - but can't quite see the method to just fire off the program

thanks
Rich

 

EdT's picture

Use the Execute program command

You can use the wisescript Execute Program command to run any program at any time.
So in your situation, all you need to do, is right at the end of your install, add the Execute Program command with the path to your installed EXE (probably based on %MAINDIR% as the install location), and ensure that the "Wait until program exits" option is not checked. That way, your install will terminate as soon as that execute command is run, without waiting for the launched EXE to close.

If your issue has been solved, please use the "Mark as Solution" link on the most relevant thread.

nac's picture

wirte a custom action

You can write a custom action inside the MSI to launch application exe after Installation finishes.

I dont know how IMPOSEBLE spells

EdT's picture

Not applicable

nac,
Wise 9.0.2 was the wisescript-only tool from the last century, and therefore MSI based solutions are not applicable.

If your issue has been solved, please use the "Mark as Solution" link on the most relevant thread.