Archive: How to use NSIS to add a bookmark to Firefox


How to use NSIS to add a bookmark to Firefox
Howdy.

I've been working on an installer that extracts a handful of files to a client computer, but I also would like to add a bookmark to Firefox or Chrome at the end of the installation.

I've spent the past few days searching, and while I've figured out my other issues, this one has proved difficult.

I looked at it from the direction of NSIS, but did not see anything, but I also looked at Firefox and Chrome to see if there's a way to add a bookmark via command line, to see if I could do something that way and hopefully just need to adapt it to work with NSIS. However, I have not found any documentation that would let me answer that question.

I've figured that Firefox uses SQLite, and Chrome uses what I guess is a JSON blob of sorts to store bookmarks in, but is there some sort of way to add a single bookmark to them?

Things that may be relevant when discussing: I'm using HM NIS Edit on Windows 8, and for my installer, I am using MUI.nsh, as this is what HM NIS Edit offers.

Thanks in advance for any suggestions you may have.


I don't really think browser vendors want you to add bookmarks (the user should be in full control). I think a lot of people will see that as evil spyware like behavior.

Even with that in mind I'm guessing their storage choice is more about already having a parser for those formats already so that is why they are stored that way.

You could try to find a command line tool to deal with sqlite and maybe try the nsis json plugin.


Anders,

Yes, I figured that was likely the case for this. I've mostly abandoned the idea, and opted to just put a link to our support page in the start menu along with the program being installed, as well as one in Internet Explorer's Favorites folder.

Thank you for the insight.