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

Application name change dynamically

Jump to solution
We need to changer the application name dynamically by script of installsheild . Please help me out for the issue .
Labels (1)
0 Kudos
(2) Solutions

Hi @Sashikanta ,

 

Help me with few more details:

  • What type of project you are using?-I could get it is basic msi project from the sample you had added here
    • If Basic MSI-Add the below code:

      function MyFunction(hMSI)
      // To Do: Declare local variables.
      STRING svName;
      begin
      MsiSetProperty(hMSI, "ProductName", "TrailProduct");
      // To Do: Write script that will be executed when MyFunction is called.

      end;

    • Since it is basic MSI project,you have to use hMSI as handle where if it is InstallScript project use ISMSI_HANDLE as MSI handle.
    • Add installscript custom action and add this function name as Function Name argument
    • Sequence it in initial phase:Here you can do Install Exec Sequence->After CostInitialize
  • If it is InstallScript project steps will slightly vary like adding the above code in InstallScript events which you could find under InstallScript view
  • Build and execute it will work(I had verified as well :-))

Thanks,

Jenifer

View solution in original post

Hi Jenifer, 

 

Thank you for the solution. I changed the application name successfully . just one step to my goal is My desktop shortcut name not changed can you help me to change the shortcut name by install shield script. 

 

Thank You 

Wait for your positive reply.  

View solution in original post

0 Kudos
(10) Replies
banna_k
Revenera
Revenera

Hi @Sashikanta,

What you meant by application name, is it the executable  installed by the installer or the installer itself ?

0 Kudos

We need to change the Application Name dynamically by InstallShield scripts. 

For Example : 

Initially its "IPC Reader", We need To Change it to "IPC Application" 

Please find the attachment for Reference. 

0 Kudos

Hi @Sashikanta ,

 

Application name and product name are same.Please try with above mentioned function 

MsiSetProperty(ISMSI_HANDLE,"ProductName", "My Product Name");

as in my last reply.

 

Hope it helps,

Thanks,

Jenifer

Hi Jenifer, 

Thank You For Your reply.

My Goal is to change product name by Script.

I tried With The script. But unable to change the product name. Can you help me more to achieve that? here I am attaching my script.

Script :

#include "isrt.h"

#include "iswi.h"

 

export prototype Func1(HWND);

function Func1(hMSI)
STRING svName;
begin
MsiSetProperty(ISMSI_HANDLE, "ProductName", "TrailProduct");
end;

 

 

 

0 Kudos

Hi @Sashikanta ,

 

Help me with few more details:

  • What type of project you are using?-I could get it is basic msi project from the sample you had added here
    • If Basic MSI-Add the below code:

      function MyFunction(hMSI)
      // To Do: Declare local variables.
      STRING svName;
      begin
      MsiSetProperty(hMSI, "ProductName", "TrailProduct");
      // To Do: Write script that will be executed when MyFunction is called.

      end;

    • Since it is basic MSI project,you have to use hMSI as handle where if it is InstallScript project use ISMSI_HANDLE as MSI handle.
    • Add installscript custom action and add this function name as Function Name argument
    • Sequence it in initial phase:Here you can do Install Exec Sequence->After CostInitialize
  • If it is InstallScript project steps will slightly vary like adding the above code in InstallScript events which you could find under InstallScript view
  • Build and execute it will work(I had verified as well :-))

Thanks,

Jenifer

Hi Jenifer, 

 

Thank you for the solution. I changed the application name successfully . just one step to my goal is My desktop shortcut name not changed can you help me to change the shortcut name by install shield script. 

 

Thank You 

Wait for your positive reply.  

0 Kudos

Hi Jenifer, 

 

Thank you for the solution. I changed the application name successfully . just one step to my goal is My desktop shortcut name not changed can you help me to change the shortcut name by install shield script. 

 

Thank You 

Wait for your positive reply.  

0 Kudos

Hi Jenifer, 

I changed the name dynamically but, the desktop icon name and Startmenu search Still showing old name . only Control panel product name are changed. please help me to get the complete solution.

 

How can I change all the places the product name?   Please help me to get the Solution.

 

I attached all the Screenshot. please help me to get the solution. 

0 Kudos

Hi @Sashikanta ,

 

You can use AddFolderIcon  installscript which creates shortcut for you but there are some tricky things you have to follow since shortcut displayname won't take property values directly as mentioned in the below link:

 

https://community.flexera.com/t5/InstallShield-Knowledge-Base/Dynamic-Shortcut-Names/ta-p/3978

 

Steps to do:

 

Thanks,

Jenifer

0 Kudos
Jenifer
Flexera Alumni

Hi @Sashikanta ,

 

You can try setting application/product name dynamically by using MsiSetProperty of installscript.Since productname is of MSI property.

Sample code would be:

export prototype Func1(HWND);

 

function Func1(hMSI)

    STRING svName;

begin

    MsiSetProperty(hMSI, "ProductName", "My Product Name");

    endif;

end;

For installscript:

MsiSetProperty(ISMSI_HANDLE,"ProductName", "My Product Name");

For more details about MsiSetProperty,please refer:https://helpnet.flexerasoftware.com/installshield22helplib/helplibrary/IHelpIScriptWIProperty.htm#customizinginstallbehavior_1713100086_1022849

 

Thanks,

Jenifer