1

I am wanting to make a silent installer as an option for administrators to deploy my product.

The product requires authentication to a master account and a user account. I want to make it possible to "stamp" the MSI for a certain user, storing their master account, user account and password. Note that none of these values are to do with Windows but are specific to the service that this installer is installing the client for.

What is the best way to do this?

Sam
  • 4,219
  • 7
  • 52
  • 80
  • If the administrator is deploying it, why can't they just run it with administrative privileges? I don't really understand the question, I guess. Why should the *installer* care who the *user* is? – Cody Gray - on strike Jul 18 '14 at 05:50
  • Hi Cody. It authenticates against a web service. The installer takes care of signing the user into the service and saving the token from the login operation. – Sam Jul 18 '14 at 05:51
  • You may need to provide more detail. The user authenticates - does that mean a dialog where they enter values? If so, the admin could add them to the MSIs Property table so that the silent install can get them from there. It's also unclear why anything needs storing on a system. It seems like you just need a silent authorization to substitute for the dialog, and custom actions and writing to the system doesn't seem to relate to that. – PhilDW Jul 18 '14 at 19:45
  • Guys, I've written to add some more detail apologies for the confusion. – Sam Jul 19 '14 at 00:12
  • Can we ask what you ended up doing to solve your problem? I am curious why my answer below was suddenly downvoted. Perhaps I didn't understand your problem? – Stein Åsmul Sep 22 '17 at 11:35
  • @SteinÅsmul I didn't down vote you. We didn't end up branding the MSI. – Sam Sep 25 '17 at 05:02
  • Yes, I already thought it was some random person, I was just wondering what you ended up doing with your MSI. Still not sure I understood the whole question, but I guess the problem was "removed". What I wrote about public properties and transforms should generally be sufficient to customize installations. – Stein Åsmul Sep 25 '17 at 15:13
  • @SteinÅsmul we were wanting to brand and put details into the MSI to avoid needing to configure it. We ended up not doing it, our installers handle this aspect of configuration. – Sam Sep 26 '17 at 00:18
  • That sounds like the right call. Especially if you want to sign your installer and maintain a list of live releases with the real create and modify dates intact. Tagging each setup would yield no consistency - just a large number of binary different setup files with different file properties. Bad for support. You could also have generated a different transforms for each client that would apply the information in question. That way your original MSI would have been untouched. This is essentially what a transform is for, to modify an original MSI in a reliable way. – Stein Åsmul Sep 26 '17 at 19:12

1 Answers1

-1

Generally speaking you should use properties to set these values silently either using the command line interface for msiexec.exe or in a transform applied via the command line:

  1. Command line:

       msiexec /i "MySetup.msi" USER="OneUser" /PASS="PassWord" /qn
    
  2. Transform:

       msiexec /i "MySetup.msi" TRANSFORMS="MyTransform.mst" /qn
    

You can generate a transform via Orca, and it can override almost any value in the associated MSI file. Transforms are heavily used for application repackaging in large companies for silent deployment via systems such as Altiris, SCCM, and similar desktop management systems.

You simply define the properties in the property table, set some default value and allow them to be overridden by command line or transform and then use these values inside a custom action to set up the connection you require, or set the properties to the appropriate fields in the service installation tables.

ServiceInstall Element in Wix. And the MSI table ServiceInstall. It looks like this post may help you, I haven't studied it in detail though: WiX ServiceInstall - setting the service to run as the current windows user

Community
  • 1
  • 1
Stein Åsmul
  • 39,960
  • 25
  • 91
  • 164