ServiceBusExplorer icon indicating copy to clipboard operation
ServiceBusExplorer copied to clipboard

Create start menu shortcut when installing from Chocolatey

Open cmeeren opened this issue 3 years ago • 11 comments

All other apps I install from Chocolatey add a shortcut to the start menu, so that I can open the start menu and type "Name of app" to find it. However, that does not work for Service Bus Explorer. I have to type the exact exe name, "servicebusexplorer", in order for the start menu to find it.

cmeeren avatar Mar 28 '22 09:03 cmeeren

Do you know if those applications use an installer or is that just Chocolatey configuration?

Do you have an example of such an app, preferably using open source?

ErikMogensen avatar Apr 07 '22 18:04 ErikMogensen

I have previously used this PowerShell snippet to create a shortcut; perhaps you can just use that?

$WshShell = New-Object -comObject WScript.Shell
$Shortcut = $WshShell.CreateShortcut("C:\ProgramData\Microsoft\Windows\Start Menu\Programs\DB Browser for SQLite.lnk")
$Shortcut.TargetPath = "C:\Program Files\DB Browser for SQLite\DB Browser for SQLite.exe"
$Shortcut.Save()

cmeeren avatar Apr 07 '22 18:04 cmeeren

Bump to avoid automatic closing

cmeeren avatar Jun 10 '22 18:06 cmeeren

Bump to avoid automatic closing

cmeeren avatar Aug 10 '22 06:08 cmeeren

This would be most rad :)

natelaff avatar Dec 31 '22 16:12 natelaff

Looks like there's a talk to add this option to Chocolatey. Otherwise, any idea how to accomplish that @natelaff ?

SeanFeldman avatar Dec 31 '22 20:12 SeanFeldman

Se my comment above for a possible solution (https://github.com/paolosalvatori/ServiceBusExplorer/issues/620#issuecomment-1092057799)

cmeeren avatar Dec 31 '22 20:12 cmeeren

@cmeeren that looks promising. I don't have much experience with Chocolatey other than what we do today to submit the packaged files for approval. Where does the PowerShell script need to go and when to invoke to ensure the shortcut is created?

SeanFeldman avatar Jan 01 '23 15:01 SeanFeldman

I have zero experience with authoring Chocolatey packages. Sorry I can't be of more help!

cmeeren avatar Jan 01 '23 16:01 cmeeren

Chocolatey seems to have a cmdlet to create a shortcut: Install-ChocolateyShortcut.

SeanFeldman avatar Jan 02 '23 15:01 SeanFeldman

Okay, so it's not a great workaround, but after installing 30+ apps via Chocolatey, I had about 15 shortcuts on my desktop (technically they were on the Public desktop). I just moved *.lnk in the C:\Users\Public\Desktop folder to C:\ProgramData\Microsoft\Windows\Start Menu.

Definitely would be better if the individual packages took care of this.

In the past I would see all of these apps on my desktop and since I like a clean desktop I would delete them and wonder where in the heck all of my shortcuts went

jimroberts-tamu avatar Jan 29 '24 23:01 jimroberts-tamu