Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
518 views
in Technique[技术] by (71.8m points)

windows installer - detect msi parameters for unattended install

I have a msi package that have option to install two different languages , is there a way to detect the parameter responsible for selecting the language so I can use the command prompt to install the package silently (unattended installation) ?

Thanks

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

The normal way to do things with an MSI is any property in the property table who is named entirely with capital letters is considered a public external property. This means it is settable when you run the MSI from the command line.

So if you work out how you want to flag your language choice, put a property in for it, and then you can link the installation of components or features inside the MSI to that flag/variable.

So if you are not familiar with the concepts yet, check out components, features and properties of MSIs. You don't mention which MSI builder you are using - if you are using the one that comes with Visual Studio i don't know if it is capable of giving you access to the components and feature, but there are one or two low priced or free (i.e. Wix) alternatives out there that do (if you are using something proper like Wise or InstallShield then you have full control over all these things).

Edit: here is a link to a script that will extract a list of public properties for you (click on the text Get MSI-File properties.vbs to see the script). Alternatively, How can I see what public properties are available? and Extracting properties from MSI file without installing may provide you some other options.

The guys over on ServerFault will probably be able to help a lot more with this, I know there are some Windows admin tools that allow you to disassemble and/or wrap up MSis but I can't remember what they are called.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...