0

I have a Setup Project that needs to be run as a silent installer. The installer used to run and open up another window to set a config setting. New requirements need me to setup up that same config value in silent mode.

So moving forward, I need the MSI to send parameters to a console application that I have already creating and runs in the commit Custom Action.

update.exe /s /v"/CONFIGVALUE"

Thanks in advance!

EDIT

The value is a URL that needs to be updated in the APP.config file. This value was assigned via a winform app that can read and write to the app.config file on commit of the installer. update.exe does not already accept any values. This is an new update to it that I have been trying to figure out.

7
  • Can you show us how the "old" config value was assigned? Was it a winform application that writes to .ini, registry, etc? Does update.exe already accept CONFIGVALUE on the command line? Commented Aug 24, 2015 at 19:15
  • 1
    So i'm clear, you want to input this URL during pre-installation tasks of MSI and use the value to write to the app.config file during post-installation tasks? I assume app.config is not present on the target machine until the file copy step(s) are complete in the MSI? Commented Aug 24, 2015 at 19:22
  • @mjw yep thats it. You fully understand. Commented Aug 25, 2015 at 3:15
  • possible duplicate of Change App.config during installation Commented Aug 25, 2015 at 12:54
  • Try the forthcoming flagged link. That should do what you're looking for. Commented Aug 25, 2015 at 12:57

1 Answer 1

1

Working backwards, look at the Arguments property in the properties window of the custom action exe, which is where you pass parameters. You can pass Windows Installer properties in square brackets, so they will resolve at install time to the actual values. So an argument of /x=[VersionNT64] gets passed into the program as x=601 on my system.

So if you have an MSI command line that's silent you'd pass your value on the MSI command line, something like msiexec /i /q CONFIGVALUE=whatever and then in the arguments you'd put [CONFIGVALUE] in the appropriate place.

Make sure you set Installer class to false in the properties window of your custom action.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.