cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
coolcasey11
Level 3

Get text area value from msi basic project into install script

Hello I have created a basic msi project. I have a text area in one of my dialogs and I need to save the value of the text area into a registry key. How do I get the value from a basic msi text box?

Labels (1)
0 Kudos
(1) Reply
Varaprasad
Level 7 Flexeran
Level 7 Flexeran

1. Set property to your edit box
         property=MYTEXTBOX

2. Create InstallScript custom action (make sure MyFunction iss elected) and sequence it as desired

3. Use install script to read the property as below and use installscript registry methods to update the value in the registry.

function MyFunction(hMSI)
// To Do: Declare local variables.
STRING textAreaValue;

NUMBER textAreaValueBuffer;
begin

textAreaValueBuffer = MAX_PATH;

if(MsiGetProperty(hMSI, "MYTEXTBOX", textAreaValue, textAreaValueBuffer) == ERROR_SUCCESS) then

SprintfBox(INFORMATION,"The value of text area cntrol","The value of MYTEXTAREA is %s", textAreaValue);

endif;
// To Do: Write script that will be executed when MyFunction is called.

end;

0 Kudos