;从注册表中读取SQL程序安装路径 ReadRegStr $R1 HKLM "SOFTWARE\Microsoft\Microsoft SQL Server\80\Tools\ClientSetup" "SQLPath" ;从注册表中读取当前计算机名 ReadRegStr $R2 HKLM "SYSTEM\CurrentControlSet\Control\ComputerName\ComputerName" "ComputerName" ;执行脚本 nsExec::ExecToLog '"$R1\Binn\isql.exe" -U "sa" -P "sa密码" -S "$R2" -d 数据库名 -i "$DESKTOP\脚本文件.sql" -o -b'