0

I want to create two shortcuts on Desktop after publishing the app, both of them should pass different args to the Main method of the Program class:

enter image description here

How can I achieve this? Or is it even possible?

godot
  • 3,422
  • 6
  • 25
  • 42
  • How are you publishing the app? You can use the way with creating of one shortcut – Pavel Anikhouski Nov 12 '19 at 13:38
  • 1
    You create two shortcuts, in the same way, as you create one shortcut ! Each shortcut can have different Parameters. Where is the problem ? – Holger Nov 12 '19 at 13:39
  • @PavelAnikhouski I use clickonce – godot Nov 12 '19 at 13:40
  • @Holger I want to achieve it automatically, when user installs the exe, I need two shortcuts created on the desktop with a different parameters. – godot Nov 12 '19 at 13:42
  • [check link](https://social.msdn.microsoft.com/Forums/windows/en-US/d395d704-d043-4f3e-b1d0-4bee4b12b98d/click-once-application-deploy-icon-and-desktop-shortcut?forum=winformssetup) and make 2 of it – Eldar Nov 12 '19 at 13:48

1 Answers1

1

Do you already use any sort of installer for your application? One example how you could do this would be to use an installer like InnoSetup for creating the desktop icons (example: How to create a desktop icon with Inno Setup). Of course you can also do this programmatically but without knowing how you publish your app I cannot give you any specific answer for your way of publishing.

Chris
  • 1,417
  • 4
  • 21
  • 53
  • 1
    Unfortunately I have no experience with clickonce. You may want to check the link that @Eldar provided on how to create shortcuts with clickonce. – Chris Nov 12 '19 at 13:51