user1393752
user1393752

Reputation: 43

NSIS and SQLITE Integration

I am writing a installer for windows using NSIS. The installer gets few properties during installation and it needs to update one of the table in sqlite database that is bundled with the installer. Is it possible to update sqlite database file using NSIS?

Upvotes: 1

Views: 897

Answers (2)

Damian
Damian

Reputation: 1259

alt option: http://sourceforge.net/projects/nsissqliteplug/

nsisSqlplugin::executeQuery "sqliteDatabase" "sql_query"

Limitations: Currently the plugin executes only insert and update queries.

Upvotes: 2

crashmstr
crashmstr

Reputation: 28573

It does not seem like there are any SQLite plugins.

Your options are:

  1. Write your own plugin (included for completeness, but almost certainly not a real option)
  2. Use nsExec to run SQLite commands via the command line interface. See discussion on NSIS forums
  3. Write a small app to include with your installer that makes the required changes

Decision probably depends on how well you know the command line interface for SQLite vs. complexity of writing a small app to do what you want.

For #3, it would be similar to what you would do with a third party installer:

ReserveFile "myexe.exe"
...
SetOutPath $TEMP
File "myexe.exe"
ExecWait '"$TEMP\myexe.exe" /parameters"

Upvotes: 2

Related Questions