Jump to content
Sign in to follow this  
L3370

Passing values with spaces in msi type switches

Recommended Posts

L3370

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

Share this post


Link to post
Share on other sites
FireFox

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

 

OS : Win XP SP2 (32 bits) / Win 7 SP1 (64 bits) / Win 8 (64 bits) | Autoit version: latest stable / beta.
Hardware : Intel(R) Core(TM) i5-2400 CPU @ 3.10Ghz / 8 GiB RAM DDR3.

My UDFs : Skype UDF | TrayIconEx UDF | GUI Panel UDF | Excel XML UDF | Is_Pressed_UDF

My Projects : YouTube Multi-downloader | FTP Easy-UP | Lock'n | WinKill | AVICapture | Skype TM | Tap Maker | ShellNew | Scriptner | Const Replacer | FT_Pocket | Chrome theme maker

My Examples : Capture toolIP Camera | Crosshair | Draw Captured Region | Picture Screensaver | Jscreenfix | Drivetemp | Picture viewer

My Snippets : Basic TCP | Systray_GetIconIndex | Intercept End task | Winpcap various | Advanced HotKeySet | Transparent Edit control

 

Share this post


Link to post
Share on other sites
L3370

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.

Share this post


Link to post
Share on other sites
FireFox

You're welcome ;)


 

OS : Win XP SP2 (32 bits) / Win 7 SP1 (64 bits) / Win 8 (64 bits) | Autoit version: latest stable / beta.
Hardware : Intel(R) Core(TM) i5-2400 CPU @ 3.10Ghz / 8 GiB RAM DDR3.

My UDFs : Skype UDF | TrayIconEx UDF | GUI Panel UDF | Excel XML UDF | Is_Pressed_UDF

My Projects : YouTube Multi-downloader | FTP Easy-UP | Lock'n | WinKill | AVICapture | Skype TM | Tap Maker | ShellNew | Scriptner | Const Replacer | FT_Pocket | Chrome theme maker

My Examples : Capture toolIP Camera | Crosshair | Draw Captured Region | Picture Screensaver | Jscreenfix | Drivetemp | Picture viewer

My Snippets : Basic TCP | Systray_GetIconIndex | Intercept End task | Winpcap various | Advanced HotKeySet | Transparent Edit control

 

Share this post


Link to post
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
Sign in to follow this  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.