Sign in to follow this  
Followers 0
marsL

How to install MSI installer with switch

9 posts in this topic

#1 ·  Posted (edited)

How I can install example.msi with example.xml ?

I tried a following command, but there is a problem with quotes

Run("msiexec.exe /i example.msi /qb /norestart AdminCFG=example.xml")

but the result is

msiexec.exe /i example.msi /qb /norestart AdminCFG=example.xml

It should be:

msiexec.exe /i "example.msi" /qb /norestart AdminCFG="example.xml"

P.S.

Ups, I think I found right way :)

Run("msiexec.exe /i ""example.msi"" /qb /norestart AdminCFG=""example.xml""")
Edited by marsL

Share this post


Link to post
Share on other sites



Hi,

a) double them ""

:) '" one ' and then " to surround the whole stuff

c) try using shellexecute

Mega


Scripts & functions Organize Includes Let Scite organize the include files

Yahtzee The game "Yahtzee" (Kniffel, DiceLion)

LoginWrapper Secure scripts by adding a query (authentication)

_RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...)

Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc.

MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times

Share this post


Link to post
Share on other sites

Or you could use single quotes around double quotes.

Run('msiexec.exe /i "example.msi" /qb /norestart AdminCFG="example.xml"')

Adam

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

OK, thanks, but what should be a command to create shortcut with switch?

This

FileCreateShortcut(@ProgramFilesDir&"\Nero\Nero Burning ROM\nero.exe /w",@DesktopDir&"\Nero Express.lnk",@ProgramFilesDir&"\Nero\Nero Burning ROM","","Nero Express",@ProgramFilesDir&"\Nero\Nero Burning ROM\nero.exe","","1",@SW_MINIMIZE)

... create shortcut with wrong switch :)

once againt, it should be:

"C:\Program Files\Nero\Nero Burning ROM\nero.exe" /w
Edited by marsL

Share this post


Link to post
Share on other sites

Try

FileCreateShortcut('"' & @ProgramFilesDir& '\Nero\Nero Burning ROM\nero.exe" /w',@DesktopDir&"\Nero Express.lnk",@ProgramFilesDir&"\Nero\Nero Burning ROM","","Nero Express",@ProgramFilesDir&"\Nero\Nero Burning ROM\nero.exe","","1",@SW_MINIMIZE)

Adam

Share this post


Link to post
Share on other sites

:)

Target's box say:

"C:\"C:\Program Files\Nero\Nero Burning ROM\nero.exe" \w"

Share this post


Link to post
Share on other sites

#7 ·  Posted (edited)

Sorry about that, didn't look at it close enough. You need the to put the /w in the args parameter.

Try this:

FileCreateShortcut(@ProgramFilesDir & "\Nero\Nero Burning ROM\nero.exe", @DesktopDir & "\Nero Express.lnk", @ProgramFilesDir & "\Nero\Nero Burning ROM", "/w", "Nero Express", @ProgramFilesDir & "\Nero\Nero Burning ROM\nero.exe", "", "1", @SW_MINIMIZE)

Adam

Edit: typos

Edited by AdamUL

Share this post


Link to post
Share on other sites

Thank, Adam

now works fine

:)

Share this post


Link to post
Share on other sites

Glad I could help.

Adam

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  
Followers 0