m.qayyum
Posts: 32
Joined: Thu Jul 30, 2015 5:15 pm
Contact:  Website

How to change desktop shortcut name with cli?

Wed Jan 31, 2018 10:29 am

Hi
I'm trying to change the desktop shortcut name but didn't able to find its command like /SetProperty ProductName="".
Can some one please help as i'm trying from yesterday. I tried to set shortcut name to [|ProductName] in source but it gives the error when I open the project.

Thanks

m.qayyum
Posts: 32
Joined: Thu Jul 30, 2015 5:15 pm
Contact:  Website

Re: How to change desktop shortcut name with cli?

Wed Jan 31, 2018 3:56 pm

It's /SetProperty ShortcuttName="" I should have tried.

m.qayyum
Posts: 32
Joined: Thu Jul 30, 2015 5:15 pm
Contact:  Website

Re: How to change desktop shortcut name with cli?

Fri Feb 02, 2018 11:31 am

Oops again I was wrong this just added new property but didn't changed shortcut name. Can someone tell me how I can edit just shortcut name from CLI?

Daniel
Posts: 8237
Joined: Mon Apr 02, 2012 1:11 pm
Contact:  Website

Re: How to change desktop shortcut name with cli?

Fri Feb 02, 2018 1:13 pm

Hello,

The correct approach will be to use a pseudo-formatted reference of a property (e.g. [|ProductName]) in the "Name" field of the shortcut properties.

Then to set this using our command line support you should use indeed the "/SetProperty" command. However please keep in mind that the name of the shortcut cannot be set EMPTY string. So, just make sure the shortcut name would not get empty.

Let us know if this helped.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

m.qayyum
Posts: 32
Joined: Thu Jul 30, 2015 5:15 pm
Contact:  Website

Re: How to change desktop shortcut name with cli?

Mon Feb 05, 2018 12:59 pm

I ended up editing it without advinst CLI.

//EDITING SOURCE
project_source = project_source.Replace("{GUID1}",guid1);
project_source = project_source.Replace("{GUID2}", guid2);
string useTitle = (custom_title != "") ? custom_title : title;
string shortTitle = ShortFileName(useTitle);
project_source = project_source.Replace("{PRODUCTNAME}", useTitle);
project_source = project_source.Replace("{SHORTCUTNAME}", shortTitle+"|"+useTitle);

There should be a straight forward way to edit shortcuts as we change ProductName.

m.qayyum
Posts: 32
Joined: Thu Jul 30, 2015 5:15 pm
Contact:  Website

Re: How to change desktop shortcut name with cli?

Mon Feb 05, 2018 1:02 pm

I used [|ProductName], it gave me this error.


Property value "---------" is disallowed.
Reason:
Invalid internal name. Referred from:
Shortcut

Daniel
Posts: 8237
Joined: Mon Apr 02, 2012 1:11 pm
Contact:  Website

Re: How to change desktop shortcut name with cli?

Wed Feb 07, 2018 4:14 pm

Hello,
I used [|ProductName], it gave me this error.


Property value "---------" is disallowed.
Reason:
Invalid internal name. Referred from:
Shortcut
This is true. You cannot set a shortcut name to "---------" value.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

m.qayyum
Posts: 32
Joined: Thu Jul 30, 2015 5:15 pm
Contact:  Website

Re: How to change desktop shortcut name with cli?

Tue Feb 20, 2018 12:52 pm

By "-------" I mean the application title not -------.

Daniel
Posts: 8237
Joined: Mon Apr 02, 2012 1:11 pm
Contact:  Website

Re: How to change desktop shortcut name with cli?

Thu Feb 22, 2018 3:26 pm

Hello,

Can you please try to give us a detailed step by step test case which replicates this behavior?

There is no need to use your application name, just try to find out any name which generates the behavior you encountered.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”