cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Sashikanta
Occasional contributor

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 .
Tags (1)
0 Kudos
1 Solution

Accepted Solutions
Flexera Jenifer
Flexera

Re: Application name change dynamically

Jump to solution

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

10 Replies
Flexera banna_k
Flexera

Re: Application name change dynamically

Jump to solution

Hi @Sashikanta,

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

0 Kudos
Flexera Jenifer
Flexera

Re: Application name change dynamically

Jump to solution

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

 

Thanks,

Jenifer

Sashikanta
Occasional contributor

Re: Application name change dynamically

Jump to solution

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
Flexera Jenifer
Flexera

Re: Application name change dynamically

Jump to solution

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

Sashikanta
Occasional contributor

Re: Application name change dynamically

Jump to solution

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
Flexera Jenifer
Flexera

Re: Application name change dynamically

Jump to solution

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

Sashikanta
Occasional contributor

Re: Application name change dynamically

Jump to solution

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
Sashikanta
Occasional contributor

Re: Application name change dynamically

Jump to solution

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
Sashikanta
Occasional contributor

Re: Application name change dynamically

Jump to solution

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