Jump to content

Recommended Posts

Posted (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 by L3370
Posted (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 by FireFox
Posted

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.

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...