L3370 Posted April 1, 2013 Share Posted April 1, 2013 (edited) Hello all. First time poster so please be kind if I have put this question in the wrong place or there is an answer already available. I have a problem with the following code: RunWait("C:\SQLEXPR.exe", " /qb INSTANCENAME=fakeinstance ADDLOCAL=SQL_Data_Files,Connectivity SECURITYMODE=SQL SAPWD=fakepass SQLACCOUNT="NT AUTHORITY\SYSTEM" requiresmsiengine=1") Problem is-- Its returning an error on the SQLACCOUNT="NT AuthoritySYSTEM" presumably because it does not like my quotes. The value i need to pass has a space in it but I always have trouble passing msi switch values with a space. Could anyone point me to my error please? Edited April 1, 2013 by L3370 Link to comment Share on other sites More sharing options...
FireFox Posted April 1, 2013 Share Posted April 1, 2013 (edited) Hi, Welcome to the autoit forum ;like this RunWait("C:\SQLEXPR.exe", '/qb INSTANCENAME=fakeinstance ADDLOCAL=SQL_Data_Files,Connectivity SECURITYMODE=SQL SAPWD=fakepass SQLACCOUNT="NT AUTHORITY\SYSTEM" requiresmsiengine=1') ;or like this RunWait("C:\SQLEXPR.exe", "/qb INSTANCENAME=fakeinstance ADDLOCAL=SQL_Data_Files,Connectivity SECURITYMODE=SQL SAPWD=fakepass SQLACCOUNT=""NT AUTHORITY\SYSTEM"" requiresmsiengine=1") A string must have a beginning and an ending quote, if there is a quote in it you must double it, otherwise use single quotes. Br, FireFox. Edited April 1, 2013 by FireFox Link to comment Share on other sites More sharing options...
L3370 Posted April 1, 2013 Author Share Posted April 1, 2013 FireFox, That was an humiliatingly quick and accurate response. I was toying with every iterations of double quotes i could think of but this simplest form. Thank you! It worked. Link to comment Share on other sites More sharing options...
FireFox Posted April 1, 2013 Share Posted April 1, 2013 You're welcome 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