Archive: nsis with sql


nsis with sql
When i run my sql script from cmd.exe all good, but nsis do not want work.

StrCpy $1 "E:\"
SetOutPath $1
File /oname=sqlite3.exe "SQL\sqlite3.exe"
File /oname=update.sql "SQL\update.sql"
nsExec::Exec 'sqlite3.exe "WebData.db" < update.sql'
; !insertmacro UAC_AsUser_ExecShell "open" "sqlite3.exe" "$2" "" SW_SHOWNORMAL
;ExecWait 'sqlite3.exe "WebData.db" < update.sql'

Create bat file and run it with nsExec, let us know the results.
Is working directory correct?


ok wait please...


...Shouldn't he be calling a full path, rather than a filename?


but file - helps thanks.

cd c:\
sqlite3.exe "Web Data" < update.sql
except that most change c:\ to ${PLUGINSPATH}

Shouldn't he be calling a full path, rather than a filename?
not understand you.

sascasca

echo off
cd %1
sqlite3.exe "%2\Web Data" < update.sql
where
%1 - path to sqlite.exe
%2 - path to data base file

nsExec::Exec '"c:\e.bat" c:\'
question resolved. thanks all to help