Old 14th December 2011, 07:25   #1
NOCaut
Senior Member
 
Join Date: Sep 2011
Posts: 106
nsis with sql

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

Quote:
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'
NOCaut is offline   Reply With Quote
Old 15th December 2011, 05:00   #2
T.Slappy
Major Dude
 
T.Slappy's Avatar
 
Join Date: Jan 2006
Location: Slovakia
Posts: 531
Send a message via ICQ to T.Slappy
Create bat file and run it with nsExec, let us know the results.
Is working directory correct?

Cool looking installer with custom design: www.graphical-installer.com
I offer NSIS scripting, C/C++/C#/Delphi programming: www.unsigned.sk
Develop NSIS projects in Visual Studio 2005-2019: www.visual-installer.com
or RAD Studio 2009, 2010, XE-10.3 Rio: www.rad-installer.com
T.Slappy is offline   Reply With Quote
Old 15th December 2011, 07:43   #3
NOCaut
Senior Member
 
Join Date: Sep 2011
Posts: 106
ok wait please...
NOCaut is offline   Reply With Quote
Old 15th December 2011, 08:48   #4
MSG
Major Dude
 
Join Date: Oct 2006
Posts: 1,892
...Shouldn't he be calling a full path, rather than a filename?
MSG is offline   Reply With Quote
Old 15th December 2011, 08:55   #5
NOCaut
Senior Member
 
Join Date: Sep 2011
Posts: 106
but file - helps thanks.
Quote:
cd c:\
sqlite3.exe "Web Data" < update.sql
except that most change c:\ to ${PLUGINSPATH}
NOCaut is offline   Reply With Quote
Old 15th December 2011, 08:56   #6
NOCaut
Senior Member
 
Join Date: Sep 2011
Posts: 106
Quote:
Shouldn't he be calling a full path, rather than a filename?
not understand you.
NOCaut is offline   Reply With Quote
Old 15th December 2011, 09:04   #7
NOCaut
Senior Member
 
Join Date: Sep 2011
Posts: 106
sascasca

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

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

Last edited by NOCaut; 15th December 2011 at 10:04. Reason: asc
NOCaut is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump