NOCaut
14th December 2011 08:25 UTC
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
15th December 2011 06:00 UTC
Create bat file and run it with nsExec, let us know the results.
Is working directory correct?
NOCaut
15th December 2011 08:43 UTC
ok wait please...
MSG
15th December 2011 09:48 UTC
...Shouldn't he be calling a full path, rather than a filename?
NOCaut
15th December 2011 09:55 UTC
but file - helps thanks.
cd c:\
sqlite3.exe "Web Data" < update.sql
except that most change c:\ to ${PLUGINSPATH}
NOCaut
15th December 2011 09:56 UTC
Shouldn't he be calling a full path, rather than a filename?
not understand you.
NOCaut
15th December 2011 10:04 UTC
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