chocolatey / choco

Chocolatey - the package manager for Windows
https://chocolatey.org
Other
10.32k stars 904 forks source link

Install flag to automatically create Start Menu shortcuts #764

Open alexchandel opened 8 years ago

alexchandel commented 8 years ago

Not creating start menu shortcuts by default, and lacking a uniform means to do so, is one of Chocolatey's weaknesses.

I propose a flag like choco install --with-shortcuts that would cause Chocolately to automatically create shortcuts for all the GUI executables found in a package's directory, just as ShimGen automatically creates shims.

Shortcuts would be placed in /ProgramData/Microsoft/Windows/Start Menu/Programs/Chocolatey/ where they cannot accidentally collide with shortcuts installed by other means. And they should be automatically removed, just like shims, when the package is uninstalled. A choco feature should also exist to make --with-shortcuts the default.

For example, the tools/Console.exe.gui stub file in the ConsoleZ package would cause the shortcut /ProgramData/Microsoft/Windows/Start Menu/Programs/Chocolatey/ConsoleZ/Console.lnk to be created.

This is differs from #395 and #519 in that Shortcuts GUI programs are automatically created and removed by Chocolatey, without having to manually install each one in chocolatelyInstall.ps1 and remove each one in chocolateyUninstall.ps1.

ferventcoder commented 8 years ago

You mean not having something built-in for the package consumer is something you consider a weakness and would like Chocolatey to do as a built-in concept?

ferventcoder commented 8 years ago

It's a good idea. I think that it's something we should add.

ferventcoder commented 8 years ago

I think this is related to #344

alexchandel commented 8 years ago

@ferventcoder I think it may be a slight weakness because it adds a step to using many GUI packages that don't explicitly install & uninstall shortcuts for their GUIs. For example, whenever I install 7zip.portable onto a new machine, I usually have to then dig around for the original exe in /ProgramData/chocolatey/lib/ and manually create a shortcut. Otherwise, other users sometimes aren't even aware it's installed.

ferventcoder commented 8 years ago

I think it's an area for improvement versus depending on a package maintainer to have defined shortcuts.

hems commented 4 years ago

I'm having this issue with NORDVPN, once i install it it doesn't show up on the start menu and if i search for "nord vpn" Windows 10 isn't finding anything.

I went into C:\ProgramData\chocolatey\lib\nordvpn and i also can't find an "exe" file to link to on the start menu. It's been over 10 years i don't use windows, so i'm very confused on which file i should link on the start menu in order to be able to launch it from the "launchbar"...

Any ideas guys?

Is there a "--create-shortcuts" option implemented already?

Thank you for your great work / support so far.

AdmiringWorm commented 4 years ago

I went into C:\ProgramData\chocolatey\lib\nordvpn and i also can't find an "exe" file to link to on the start menu. It's been over 10 years i don't use windows, so i'm very confused on which file i should link on the start menu in order to be able to launch it from the "launchbar"...

The directory you mentioned is the package directory, not the directory for the installation of NordVPN. NordVPN gets installed into C:\Program Files\NordVPN (I think, not on a Windows machine right now, so can't verify).

I'm having this issue with NORDVPN, once i install it it doesn't show up on the start menu and if i search for "nord vpn" Windows 10 isn't finding anything.

Could be a windows start menu caching issue, as the installer (the package is just a wrapper around the installer) should create an icon on the start menu. However, I have sometimes seen this not to show up until the start menu is refreshed/rebuilt or a reboot have occurred.

If you have any further issues, please open an issue over at https://github.com/AdmiringWorm/chocolatey-packages as this is not a problem in chocolatey.