Use cases:
Here's the implementation I suggest:
explorercontextmenu)choco preferences disable desktopshortcuts explorercontextmenu<preferences> section-no: choco install mypackage -no-desktopshortcuts -no-contextmenuupgrade, they overwrite the previous package preference<preferences> section for nowexplorercontextmenu and desktopshortcuts, as those are the two obvious and most visible contendersRead about the whole discussion here: https://groups.google.com/forum/#!topic/chocolatey/wQmapfXr-rs
You want something like USE flags of Gentoo Portage. It's very useful system, but it requires carefully guided repository. As I see right now chocolatey provides much more freedom for package authors. It has some features and drawbacks...
Thanks @pyhedgehog - that's exactly what I'd like to see. I'll bring that back in the discussion at https://groups.google.com/forum/#!topic/chocolatey/wQmapfXr-rs and potentially update that issue
At least *no desktop shortcuts should be an option. I don't need a programm on desk when i open it via file the assoc programm.
*Edit: of course no
@xtf1 I'm a huge fan of no desktop shortcuts taking up my nice clean desktop. I just want to ensure we get this right.
Yeah, after every choco upgrade run, I need to remove those desktop shortcuts. Would really be nice to have an option to suppress their creation in the first place.
Due to reasons mentioned such as the many different "standard" installers, I can see how this is a big PITA.
Thinking in Chocolatey baby steps, if a preference was created for not wanting shortcuts, it seems easy to stop it at the Chocolatey level by checking the preference and negating Install-ChocolateyShortcut when called.
I'll join the I-hate-a-million-shortcuts-popping-up-on-my-desktop club, but I find the topic a trivial matter. I'd argue it's easier to delete shortcuts I don't want than hunt down and create ones I do want.
I have a group policy that deletes all my normal program shortcuts that add an icon post installation and upgrade - works great! :)
Going back to the real problem of so many installers and so many possible switches and scenarios, it seems to me a possible solution would be to get a list of current icons on the desktop (current user and public) before an install of a package, then compare that to a new list post install of the package, and delete the delta .LNKs. IMHO this just feels strange being in Chocolatey core but could probably be implemented via an extension. Instead of messing with adding to the config/preferences/settings users could just install the extension if they don't want shortcuts. Then the various Chocolatey install functions could check for the extension and use it if installed. This makes it easy to opt-in and adds no overhead to packagers.
Honestly I believe that users who don't want icons should request the packagers of each relevant package for a /NOICON argument for the package if it's possible for the program package to support it.
+1 for this feature. It's nice to be able to roll out apps to users, but typically we don't want them getting the icon on their desktop> Getting a flood of calls to the helpdesk with "Whats this GhostScript icon on my computer - Have I been hacked" is not much fun. Yes group policy can work wonders, but for msp's that not very scalable across multiple companies.
possible solution would be to get a list of current icons on the desktop (current user and public) before an install of a package, then compare that to a new list post install of the package, and delete the delta .LNKs.
What if user changes their desktop shortcuts while installing the package? E.g. adding their own shortcut unrelated to the chocolatey packages. With this approach it would delete those too...
This looks like a duplicate of #4?
@rluks That is a pretty short period though, for most users. And that behavior can be documented as well.
Any Update to this issue?
Just some additional thoughts on possible implementation...
Install-ChocolateyInstallPackage already can work some extra magic when filetype MSI is defined. I think the hump is in figuring out what installer the program is using when the filetype is simply defined as EXE. A new parameter of "installertype" could be implemented to define what brand installer is being used; i.e. https://en.wikipedia.org/wiki/List_of_installation_software. When the installertype is known then a standard list known options for that installer could be used. So if a Chocolatey user preference of NoDesktopIcons was set, Chocolatey could use the appropriate install parameter associated with the installer to tell it not to make desktop icons automagically.
This could then be expanded to include other common installer specific options.
Theoretically this could make packaging easier for maintainers as they wouldn't need to necessarily always figure out the silent install options, just figure out and define which installer is in use and let Chocolatey handle it from there.
Sounds feasible, right?
Brute force option, checking desktop before and after install runs, possibly asking the user to verify the deletion. Would have to check all the places that could show up on the users desktop.
I'm monitoring to see when/if this gets implemented in a new version of Chocolatey. Milestone keeps pushing forward, so far for 4 releases. I'd like to know this issue's (real) priority on the roadmap.
Sometime in the future I plan an upgrade to choco-upgrade-all-at which will kludge the ability to delete icon additions post install. Basically I'm going to have the task run a batch file that anyone can add pre or post processing into manually. I'll build in an option to either get a list of existing icons and delete the delta or simply moving existing icons to a temporary directory, delete the new icons, and move back the pre-existing icons. When I find the time...
Sorry for the slight spaminess, but I'm posting here also the explanation of how the two recently-mentioning issues relate, in my view.
There are (at least) four kinds of icons/shortcuts:
and there are (at least) three policies w.r.t. adding these shortcuts:
and these policies can be set at:
Now, here's what these issues ask for:
| Issue | Kind of shortcut | Requested policy | Policy scope |
| -------- |:------------------:|:-------------------:|:--------------:|
| #4 (this one) | 1 | 2 | 2 |
| #344 | 1 | 2 | 1 |
| #344 | 1 | 3 | 1 |
| #2016 | 2 | 3 | 2 |
I believe most users who asked for any of these four possibilities would find the others useful as well.
Looks good to me.
Due to reasons mentioned such as the many different "standard" installers, I can see how this is a big PITA.
Thinking in Chocolatey baby steps, if a preference was created for not wanting shortcuts, it seems easy to stop it at the Chocolatey level by checking the preference and negating Install-ChocolateyShortcut when called.
I'll join the I-hate-a-million-shortcuts-popping-up-on-my-desktop club, but I find the topic a trivial matter. I'd argue it's easier to delete shortcuts I don't want than hunt down and create ones I do want.
I have a group policy that deletes all my normal program shortcuts that add an icon post installation and upgrade - works great! :)
Going back to the real problem of so many installers and so many possible switches and scenarios, it seems to me a possible solution would be to get a list of current icons on the desktop (current user and public) before an install of a package, then compare that to a new list post install of the package, and delete the delta .LNKs. IMHO this just feels strange being in Chocolatey core but could probably be implemented via an extension. Instead of messing with adding to the config/preferences/settings users could just install the extension if they don't want shortcuts. Then the various Chocolatey install functions could check for the extension and use it if installed. This makes it easy to opt-in and adds no overhead to packagers.
Honestly I believe that users who don't want icons should request the packagers of each relevant package for a /NOICON argument for the package if it's possible for the program package to support it.
While this is discussed here, can you provide details how to create this "group policy"?
While this is discussed here, can you provide details how to create this "group policy"?
https://www.tenforums.com/tutorials/104597-enable-disable-changing-desktop-icons-windows.html
I went to the bottom of the tutorial and used the disable icons via registry. Seems to be working.
Hi,
I just signed up to comment in this thread. I'll join my voice to those already requesting the option to remove desktop icons at installation/upgrade.
We are in the process of migrating our customer's base to Microsoft Intune to manage their computers. Using registry workarounds is not a viable long term solution in our eyes and GPOs are already out of the equation due to hybrid domain join and the hefty cost of having to deploy Azure Active Directory Domain Services associated to pure Azure AD join devices. To top it off, we are moving our customer's documents to OneDrive for those with valid Microsoft 365 licenses resulting in useless shortcut creation every time a user will switch device if we do not clean up the desktop. I am surely not the only MSP guy out there running into this issue and I'm surely not the only MSP guy integrating Microsoft Intune and adding Chocolatey in their RMM stack in these Covid-19 times.
This leaves me with 2 options at the moment. Either I add more code in my PS chocolatey deployment script or I wrap a PS script in a W32 application to delete specific icons. I don't mind adding more code in my deployment script in the immediate future. Where I have an issue is that not all our deployment scripts are monolithic and they can vary from one customer to an another. I already know that in some upcoming projects some of them will requests shortcuts to be deleted while others will want to keep them. Let's just say that it would be a whole lot cleaner adding switches at the installation/upgrade process.
Indeed, as @sduguay-apttech , the deluge of desktop and menu icons forced upon us is one of the reasons it's problematic for me to recommend chocolatey to non-technical people. They'll complain to me "Why is my start menu being filled with the junk I sorted through and categorized/deleted?"
Most helpful comment
Yeah, after every choco upgrade run, I need to remove those desktop shortcuts. Would really be nice to have an option to suppress their creation in the first place.