Silent database import installer: Difference between revisions
From NSIS Wiki
Jump to navigationJump to search
m (Wikipedia python library) |
m (Updated author and download links, and changed format of some pages.) |
||
Line 26: | Line 26: | ||
SectionEnd</highlight-nsis> | SectionEnd</highlight-nsis> | ||
Page author: sunjammer | Page author: [[User:sunjammer|sunjammer]] |
Revision as of 12:17, 23 April 2005
Description
This was an installer I created to import the NSIS Archive database contents into my own local database. Anyone wanting to use the nsExec plugin should find this interesting:
The Script
OutFile importdb.exe SilentInstall silent Section nsExec::Exec 'plink -ssh -batch sunjammerx@nsis.sourceforge.net "~/dump_mysql > ~/dblocation"' nsExec::Exec 'pscp sunjammerx@nsis.sourceforge.net:~/dblocation .' FileOpen $0 '$EXEDIR\dblocation' 'r' FileRead $0 $1 FileClose $0 Delete '$EXEDIR\dblocation' StrCpy $1 $1 -1 nsExec::Exec 'pscp sunjammerx@nsis.sourceforge.net:$1 "$EXEDIR\dbfile.sql"' nsExec::Exec 'plink -ssh -batch sunjammerx@nsis.sourceforge.net "rm -f dblocation $1"' Delete '$EXEDIR\dbfile.sql.out' nsExec::Exec 'bzip2 -d dbfile.sql' nsExec::Exec 'c:\mysql\bin\mysql -e "drop database nsisweb"' nsExec::Exec 'c:\mysql\bin\mysql -e "create database nsisweb"' nsExec::Exec 'cmd /C c:\mysql\bin\mysql -D nsisweb < dbfile.sql.out' nsExec::Exec 'c:\mysql\bin\mysql -D nsisweb -e "delete from nsisweb_sessions"' Delete 'e:\src\sunjammer.net\archive\engine\sessions\*.*'; Delete '$EXEDIR\dbfile.sql' Delete '$EXEDIR\dbfile.sql.out' SectionEnd
Page author: sunjammer