Old 15th March 2007, 15:32   #1
vc6
Junior Member
 
Join Date: Feb 2007
Posts: 48
Silent Install of vcredist_x86.exe via NSIS

Non-silent install of vcredist_x86.exe (i.e. by simply ExecWait-ing it with no switches) works.

However, I am now interested in silentely installing it.

I found an MSDN blog that describes how to do so:


vcredist_x86.exe /q:a /c:"VCREDI~1.EXE /q:a /c:""msiexec /i vcredist.msi /qb!"" "

(notice the quotation marks - they are critical!)

From the command line, the above works great.

However, from the NSIS script it simply doesn't work.

I tried esacping those quotation marks once:

Quote:
ExecWait '"$INSTDIR\${DLLMSVC8} /q:a /c:$\"VCREDI~1.EXE /q:a /c:$\"$\"msiexec /i vcredist.msi /qb!$\"$\" $\""'
and twice:

Quote:
ExecWait '"$INSTDIR\${DLLMSVC8} /q:a /c:$\$\"VCREDI~1.EXE /q:a /c:$\$\"$\$\"msiexec /i vcredist.msi /qb!$\$\"$\$\" $\$\""'
But that did not solve the problem.

How do I deal with so many quotation marks in one string in an NSIS script?

Any idea or tip would be appreciated.

Thanks,
Victor
vc6 is offline   Reply With Quote
Old 15th March 2007, 15:47   #2
Anders
Moderator
 
Anders's Avatar
 
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,119
$\"$\" and not $\$\"

as far as i can see
PHP Code:
ExecWait '"$INSTDIR\${DLLMSVC8}" /q:a /c:"VCREDI~1.EXE /q:a /c:""msiexec /i vcredist.msi /qb!"" "' 
should work

IntOp $PostCount $PostCount + 1
Anders is offline   Reply With Quote
Old 15th March 2007, 15:57   #3
vc6
Junior Member
 
Join Date: Feb 2007
Posts: 48
Quote:
Originally posted by Anders
$\"$\" and not $\$\"

as far as i can see
PHP Code:
ExecWait '"$INSTDIR\${DLLMSVC8}" /q:a /c:"VCREDI~1.EXE /q:a /c:""msiexec /i vcredist.msi /qb!"" "' 
should work
Bingo! This works like a charm

For some reason it's not totally silent (yet) but at least I passed the quotation marks hurdle in NSIS (thanks to you).

Thank you!
Victor
vc6 is offline   Reply With Quote
Old 16th March 2007, 10:43   #4
onad
Senior Member
 
onad's Avatar
 
Join Date: Dec 2004
Location: Turkey
Posts: 447
/q [n|b|r|f] The /q option is used to set the user interface level in conjunction with the following flags:
q or qn creates no user interface
qb creates a basic user interface
The user interface settings below display a modal dialog box at the end of installation:
qr displays a reduced user interface
qf displays a full user interface
qn+ displays no user interface
qb+ displays a basic user interface

"Just do it"
onad is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump