Skip to content
⌘ NSIS Forum Archive

nsis with sql

7 posts

NOCaut#

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'
T.Slappy#
Create bat file and run it with nsExec, let us know the results.
Is working directory correct?
NOCaut#
but file - helps thanks.
cd c:\
sqlite3.exe "Web Data" < update.sql
except that most change c:\ to ${PLUGINSPATH}
NOCaut#edited
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