sqlitebrowser / sqlitebrowser

Official home of the DB Browser for SQLite (DB4S) project. Previously known as "SQLite Database Browser" and "Database Browser for SQLite". Website at:
https://sqlitebrowser.org
Other
21.19k stars 2.14k forks source link

Windows installer does not install any shortcuts to launch program if installed in silent/passive mode #2460

Open astrohart opened 3 years ago

astrohart commented 3 years ago

Details for the issue

What did you do?

  1. Downloaded the .msi for 64-bit Windows from here: https://download.sqlitebrowser.org/DB.Browser.for.SQLite-3.12.0-win64.msi
  2. Launched the command line <windows-dir>\System32\msiexec.exe /i <msi-download-path> /passive /qb /norestart

The use case is to install DB Browser from a .bat file that builds an image of a VM for testing, and automate the install.

What did you expect to see?

Expected to see at least a Start Menu shortcut or Desktop shortcut installed. I noticed, when I launched the .msi in a fully interactive mode, all the check boxes on the Shortcuts page of the Setup Wizard are blank.

Installer should be modified to always create shortcuts by default, instead of the current, which is to not create any shortcuts by default.

What did you see instead?

Once the installation finished in passive mode (automatic, with progress bar only), there is now no way to launch DB Browser from, e.g., a Start Menu or other shortcut. Would be nice if at least a Start Menu shortcut were created by the installer by default.

Of course, I can always create one by hand but I am trying to script the install.

Useful extra information

The info below often helps, please fill it out if you're able to. :)

What operating system are you using?

What is your DB4S version?

Did you also

chrisjlocke commented 3 years ago

Just a nod that DB4S is pretty much 'portable', so technically, you shouldn't need to script it - just extract the files (I'd download from the .zip, rather than the MSI) and slap the shortcuts on the 'public' desktop (users can't delete it then...) But you're right - the installer by default doesn't provide shortcuts, so running in silent mode will just give the defaults.

astrohart commented 3 years ago

I completely disagree.

I do not see why it being portable means it can't be scripted.  I think, as a best-practice, the installer should be altered to turn shortcuts on by default.  I chain a lot of IDE versions and utils together into a massive script-of-scripts to bring my dev machine "big iron" back if, say, it gets hit by a virus.  We're talking tons of programs of which DB Browser is just one. 

I find your answer very puzzling and counter intuitive and not helpful at all.  Obviously I could create shortcuts by hand, but that kind of defeats the purpose of a silent installer running and then you being able to pull the program up on the Start menu.

I'd really rather not make my own install package because the continuous-release process you do makes new .msi's available on an ongoing basis for version updates.  .msi's are provided for portable apps to allow sys admins and IT guys easy way to load a lot of software across a lot of user computers in an automated fashion. 

Shortcuts should be turned on by default.  It's a simple code tweak that takes 5 seconds to make.

Brian Hart

justinclift commented 3 years ago

Not being a regular user of Windows, I'm not sure if this is a dumb question... but isn't it possible to create shortcuts via scripting? eg batch file or powershell?

That being said, we could probably change our install defaults to have one of the binaries (SQLCipher?) pre-selected. :smile:

(Brian, I also adjusted the formatting of your reply above as GitHub seemed to have somewhat mangled it :wink:)

justinclift commented 3 years ago

... the continuous-release process you do makes new .msi's available on an ongoing basis for version updates.

Are you meaning our nightly builds? eg https://nightlies.sqlitebrowser.org/latest/

I'm not sure blindly grabbing those is a super safe idea. They're our development builds, and while most of the time they're pretty stable occasionally we do experimental things in there that aren't production quality.

Our standard releases don't happen all that often. eg maybe one major release in a year, with one or two follow up bug fix releases

astrohart commented 3 years ago

Hi,

Still seems kind of hacky to have my script be the one to create the shortcut.  Especially when 32-bit vs 64-bit platforms have a different "program files" location for the respective platform that the installer writes the files to...would have to develop separate scripts one for each platform.

Why not just tweak the installer and save time?  It's a 5-millisecond change to your WiX .wxs file.

I strongly suggest simply altering the installer to select the binary's shortcut by default.  This way it pops onto the Desktop and Start Menu.  

If people do not want shortcuts from a scripted installer, then they can always do a file operation in the .bat or .ps1 file to remove the installed shortcut.

Would really appreciate the change.  Would make it more user friendly.

Brian

astrohart commented 3 years ago

I am not really talking about blindly grabbing anything.

It just would be my strong recommendation that, as a usability best-practice, the code for the .msi installer be tweaked, such that shortcuts are turned on by default, so that a .msi silent install will produce them automatically.

Brian

justinclift commented 3 years ago

Yeah, I can see having at least one of the install choices be selected by default could be useful.

@chrisjlocke @karim (and anyone else) What do you reckon? :smile:

chrisjlocke commented 3 years ago

I find your answer very puzzling and counter intuitive and not helpful at all.

Apologies. I was simply suggesting that DB4S doesn't need to be 'installed' and can be simply run from an extracted directory - its why we issue the ZIP file. Creating a shortcut is a simple process too, but maybe I wasn't clear enough.
If you're installing via a script, then there is a Chocolatey package for DB4S ... but again, it has the same shortcut issue... (#2458) - fixing the MSI would solve both issues.

@chrisjlocke @karim (and anyone else) What do you reckon? 😄

Easy tweak to the config - a shortcut on the desktop should be on by default anyway - otherwise newbies would have a struggle finding the application again!

justinclift commented 3 years ago

Cool. Anyone interested in making a PR for it? :smile:

astrohart commented 3 years ago

I strongly suggest also enabling the Start Menu shortcut by default. If you want one or the other, Start Menu should be priority. 

This enables clicking the "Windows" icon on the Task bar, and then you can type into the search "DB Browser" and it will pop up in the search.

Desktop is also nice since, when using the .msi as a scripted install, the desktop icon popping up serves as a visual cue to the user that the product has been installed successfully.

Brian

chrisjlocke commented 3 years ago

Anyone interested in making a PR for it?

👍

astrohart commented 3 years ago

@chrisjlocke please take my suggestion to heart - turn on BOTH Start Menu and Desktop shortcuts by default.

barbalex commented 2 years ago

I just spent 15 Minutes after having installed, trying to find out how to start the app. Found this issue but still was no wiser. Searched more and finally found the app in the programs folder. Not every app is easy to find in the huge folder list of the two program folders on windows. Sometimes the name you have to search for is not very intuitive (sqlite? db?). So I had to read the name of every single folder until I found it.

Would be great to have that start menu shortcut.

What I don't get: there is the merged pull request. Why does this not work in version 3.12.2?

chrisjlocke commented 2 years ago

Is this installed normally, or (as per the subject) via silent/passive mode?

barbalex commented 2 years ago

I double clicked the standard installer for 64-bit Windows

chrisjlocke commented 2 years ago

So when you ran the installer, did you see the below screen?

image

Did you click any of the checkboxes?

This issue is related to (as per the screenshot) the checkboxes being initially unticked so a silent install (ie, with no dialogs) means no shortcuts get created. If you double-clicked the installer, then you would have run it 'normally', ie, with dialogs, and should have had the option to tick the checkboxes.

If you run the .msi again to uninstall, and run the .msi a further time to install, then you should be able to get to that dialog and make the shortcuts as required.

barbalex commented 2 years ago

@chrisjlocke Hm. I guess I must have clicked too fast during installation. When uninstalling, then re-installing the screen appeared, I clicked the options and they worked. Sorry for spamming this issue! And thanks for this great tool.