Community Forums
Results 1 to 4 of 4

Thread: How to use a property set in a dialog

  1. #1
    Join Date
    Jan 2017
    Posts
    6

    How to use a property set in a dialog

    I'm using InstallShield Professional 2016. I have an SQLLogin dialog, which creates a property IS_SQLSERVER_DATABASE for the server name, and I'll need to use this property in an InstallScript script to create the final connection string.

    How can I get the value of IS_SQLSERVER_DATABASE in the script to use it?

  2. #2
    Join Date
    Aug 2016
    Posts
    8

  3. #3
    Join Date
    Feb 2017
    Posts
    4

    Check data in registrys windows and call .exe file

    Hello
    I want to create a dialog with 1 edit field for take one parameter in install script mode in Install shield software. This parameter must searched in windows registry (value of a key name or a key name for check is a exists a software in registry or not. This software don’t exist in Prerequisites or Objects ) .If this parameter not exists in registry, call a setup.exe file for installed a software ,else go to after dialog .This parameter can change at any time installation my setup file. I wrote 4 script for it and I use any scripts in my project in OnFirstUIBefore function and in Dlg_SdRegisterUser . actually i don’t know where should i use from they or set a other thing in other places. I use my script in view list( install script view and OnFirstUIBefore function and in Dlg_SdRegisterUser ), But I don’t get my target.
    I have 2 question:
    1) Where do I use my script? Or how i want to get my target?Because maybe i'm wrong path .
    2)For call a setup.exe file of any software(This software don’t exist in Prerequisites or Objects ), must Which function do I use?
    One script is:
    Dlg_SdRegisterUser:
    //I delete company name edit field in SdRegisterUser dialog.
    szMsg = "";
    szTitle1 = "";
    //{{IS_SCRIPT_TAG(Dlg_SdRegisterUser)
    nResult =SdRegisterUser( szTitle, szMsg, szName, szCompany );
    if (nResult = BACK) goto Dlg_SdLicense2;
    nresault2=RegDBKeyExist (szName );
    if((nresault2=1) && (nResult=0)) then
    goto Dlg_SetupType2;
    else
    MessageBox("error in your input", SEVERE);
    goto Dlg_SdRegisterUser; // this line is place for call setup.exe file of software(gusetion 2)
    endif;
    //}}IS_SCRIPT_TAG(Dlg_SdRegisterUser)
    ……………………………………………………………………………………………………………………………………………..
    Two script is:
    Dlg_SdRegisterUser:
    //I delete company name edit field in SdRegisterUser dialog.
    szMsg = "";
    szTitle1 = "";
    //{{IS_SCRIPT_TAG(Dlg_SdRegisterUser)
    nResult =SdRegisterUser( szTitle, szMsg, szName, szCompany );
    if (nResult = BACK) goto Dlg_SdLicense2;
    nresault1= RegDBSetDefaultRoot ( nRootKey );
    nresault2=RegDBGetKeyValueEx ( szKey, szName, nvType, svValue, nvSize ) ;
    if(nresault2=nResult) then goto Dlg_SdLicense2;
    else
    MessageBox("Unable to find a qualifying program. " +"Setup will now exit.", SEVERE);
    goto Dlg_SdRegisterUser; // this line is place for call setup.exe file of software(gusetion 2)
    endif;
    //}}IS_SCRIPT_TAG(Dlg_SdRegisterUser)
    ……………………………………………………………………………………………………………………………………………
    Three script is:
    Dlg_SdRegisterUser:
    szMsg = "";
    szTitle1 = "";
    //{{IS_SCRIPT_TAG(Dlg_SdRegisterUser)
    nResult =SdRegisterUser( szTitle, szMsg, szName, szCompany );
    if (nResult = BACK) goto Dlg_SdLicense2;
    nresault2=RegDBKeyExist (szName );
    if((nresault2=1) && (nResult=0)) then
    goto Dlg_SetupType2;
    else
    MessageBox("error in your input", SEVERE);
    goto Dlg_SdRegisterUser; // this line is place for call setup.exe file of software(gusetion 2)
    endif;
    //}}IS_SCRIPT_TAG(Dlg_SdRegisterUser)
    ……………………………………………………………………………………………………………………………….
    four script is:
    Dlg_SdRegisterUser:
    szMsg = "";
    szTitle = "";
    nResult =SdRegisterUser( szTitle, szMsg, szName, szCompany );
    if (nResult = BACK) goto Dlg_SdLicense2;
    szName= szSubKey;
    nresault2=RegDBKeyExist (szSubKey );
    if (szName= szSubKey) then
    goto Dlg_SetupType2;
    else
    MessageBox("error in your input", SEVERE);
    goto Dlg_SdRegisterUser; // this line is place for call setup.exe file of software(gusetion 2).
    endif;

    And in OnAppSearch function after abow script :
    function OnAppSearch()
    string szSubKey;
    number nresault2;
    begin
    nresault2=RegDBKeyExist (szSubKey );
    if(nresault2=1) then
    return nresault2;
    endif;
    end;
    and I set value for this script in AppSearch and Reglocator table in my project from below link:
    http://helpnet.installshield.com/ins...ryReadData.htm
    Thanks for your help.

  4. #4
    Join Date
    Jan 2017
    Posts
    6
    @beti17 that answer seems unrelated to my question. You might want to start a new topic.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •