Jump to content

Passing values with spaces in msi type switches


Recommended Posts

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
Link to comment
Share on other sites

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
Link to comment
Share on other sites

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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...