Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MsiHelper should allow running an installer silently #400

Closed
ShadowWolf opened this issue Apr 18, 2014 · 2 comments
Closed

MsiHelper should allow running an installer silently #400

ShadowWolf opened this issue Apr 18, 2014 · 2 comments

Comments

@ShadowWolf
Copy link

The MSIHelper module statically passes the /qb flag to msiexec. It would be nicer if, instead, that was customizable in the MSIParams type (record?).

I'm new to F# but this is my likely bad re-implementation I went with since I couldn't figure out how to extend a record.

let CustomUninstall (setParams : MSIParams -> MSIParams) setup silent = 
    traceStartTask "MSI-Uninstall" setup
    let parameters = setParams MSIDefaults
    let args = sprintf "%s /l* %s /x %s" (if silent then "/qn" else "/qb") parameters.LogFile setup

    if 0 <> ExecProcess (fun info ->  
        info.FileName <- parameters.ToolPath
        info.WorkingDirectory <- parameters.WorkingDir
        info.Arguments <- args) parameters.TimeOut && parameters.ThrowIfSetupFails 
    then
        failwithf "MSI-Uninstall %s failed." args

    traceEndTask "MSI-Uninstall" setup```
@forki
Copy link
Member

forki commented Apr 23, 2014

I implemented this by adding a property to the parameters. Does this work for you?

@forki forki closed this as completed in b2542ef Apr 23, 2014
@ShadowWolf
Copy link
Author

Yes that works great :) Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants