Squirrel.windows: Rename a shortcut

Created on 28 Jul 2015  路  10Comments  路  Source: Squirrel/Squirrel.Windows

I'm looking at the CreateShortcutsForExecutable and it doesn't have an option to name the shortcut. I notice that the Shortcut name is the same as the exe name, but I'm hoping to be able to change it per environment.

MyApp.exe

  • (dev shortcut) MyApp - Dev
  • (qual shortcut) MyApp - Qual
  • (prod shortcut) MyApp

Is there an easy way to do this with the stuff built into Squirrel now? Since I'm super lazy, what's the preferred approach to achieving this?

Most helpful comment

Why not use the title as specified in the NuGet package to name the shortcut?
EDIT: What I was looking is explained there. Squirrel rocks!

All 10 comments

Same problem here, what about a new parameter in UpdateManager:CreateShortcutsForExecutable()?

I think you probably want to do this by-hand yourself, it should be pretty easy to call CreateShortcutsForExecutable then rename it

@paulcbetts does Squirrel have hooks into the shortcut locations, or do I have to try and figure those out manually?

@ChaseFlorell Gotta figure them out yourself though if you look at the Squirrel source it's not so bad

Update: actually it might be That Bad, maybe we should have an API for this

Yeah, I was thinking it would be nice to have an overload on CreateShortcutsForExecutable

@paulcbetts would you be willing to re-open this and give a little guidance on how you envision it being implemented? I'd be interested on working on it and submitting a PR. This is definitely a need in our Continuous Delivery pipeline.

@ChaseFlorell I would instead have a new method GetShortcutsForExecutable that has an identical signature but instead of doing something, returns the ShellLink object that it _would_ create, which means you can edit it and commit it yourself

Any updates on this? I could use it as well.

Why not use the title as specified in the NuGet package to name the shortcut?
EDIT: What I was looking is explained there. Squirrel rocks!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ralish picture ralish  路  4Comments

CodeFunta picture CodeFunta  路  6Comments

bkCDL picture bkCDL  路  5Comments

estyfen picture estyfen  路  4Comments

aneeff picture aneeff  路  5Comments