bjham13 Posted October 22, 2012 Share Posted October 22, 2012 Hello All, I am new to AutoIt, and hope that someone out there can help me with my issue. The problem I am having is that the script is exiting part-way through (See script below). Line 1 and 2 run without any issue. But when it gets to the end of the second line, the script exits with and exit code of '0'. So line 3 and 4 get missed. Any help that can be given on this one would be highly appreciated. Thanks in advance. RunWait("Windows XP Power Shell /quiet /norestart") RunWait('SQLEXPR.EXE /qb ADDLOCAL="SQL_Engine,SQL_Data_Files,Connectivity" INSTANCENAME="instance" install=SQL_Engine SECURITYMODE=SQL SAPWD="password" DISABLENETWORKPROTOCOLS=0 SKUUPGRADE=1 SQLACCOUNT="NT AUTHORITY\SYSTEM" AGTACCOUNT="NT AUTHORITY\SYSTEM" SQLBROWSERACCOUNT="NT AUTHORITY\SYSTEM" SQLBROWSERAUTOSTART=1 SQLAUTOSTART=1 AGTAUTOSTART=1 SQLCOLLATION="Latin1_General_CI_AS"') RunWait('sqlcmd -U sa -P password -S .\instance -d "MASTER" -i addVBQUser.sql') RunWait("SQLServer2005_SSMSEE.msi /q") Exit Link to comment Share on other sites More sharing options...
jchd Posted October 22, 2012 Share Posted October 22, 2012 Multi-line AutoIt statements require AutoIt line continuation: RunWait("Windows XP Power Shell /quiet /norestart") RunWait('SQLEXPR.EXE /qb ADDLOCAL="SQL_Engine,SQL_Data_Files,Connectivity" INSTANCENAME="instance" ' & _ 'install=SQL_Engine SECURITYMODE=SQL SAPWD="password" DISABLENETWORKPROTOCOLS=0 ' & _ 'SKUUPGRADE=1 SQLACCOUNT="NT AUTHORITYSYSTEM" AGTACCOUNT="NT AUTHORITYSYSTEM" ' & _ 'SQLBROWSERACCOUNT="NT AUTHORITYSYSTEM" SQLBROWSERAUTOSTART=1 SQLAUTOSTART=1 AGTAUTOSTART=1 ' & _ 'SQLCOLLATION="Latin1_General_CI_AS"') RunWait('sqlcmd -U sa -P password -S .instance -d "MASTER" -i addVBQUser.sql') RunWait("SQLServer2005_SSMSEE.msi /q") Exit This wonderful site allows debugging and testing regular expressions (many flavors available). An absolute must have in your bookmarks.Another excellent RegExp tutorial. Don't forget downloading your copy of up-to-date pcretest.exe and pcregrep.exe hereRegExp tutorial: enough to get startedPCRE v8.33 regexp documentation latest available release and currently implemented in AutoIt beta. SQLitespeed is another feature-rich premier SQLite manager (includes import/export). Well worth a try.SQLite Expert (freeware Personal Edition or payware Pro version) is a very useful SQLite database manager.An excellent eBook covering almost every aspect of SQLite3: a must-read for anyone doing serious work.SQL tutorial (covers "generic" SQL, but most of it applies to SQLite as well)A work-in-progress SQLite3 tutorial. Don't miss other LxyzTHW pages!SQLite official website with full documentation (may be newer than the SQLite library that comes standard with AutoIt) Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now