Knows Not Much
Knows Not Much

Reputation: 31526

Install PowerShell Module from WIX package

I have written a powershell module.

I can install it from command line by using InstallUtil.exe

However I don't want my users to do this. So I want to develop a WIX package which will install my powershell module.

In my wix package I try to launch installutil but it does not work. I also found some articles on web which told me not to use installutil.

So the questions is how to develop a wix package which will install a powershell module.

My objective is

  1. install powershell module from wix
  2. edit Profile.ps1 and add the new snapin.

Upvotes: 2

Views: 1186

Answers (1)

NickRamirez
NickRamirez

Reputation: 340

There's a WiX extension for installing powershell snapins. I haven't used it. Here's some documentation on the WiX elements that you'd use.

http://wixtoolset.org/documentation/manual/v3/xsd/ps/

It looks like you create a element that sits inside of a File element that identifies your snapin file. The SnapIn should give you what you need to register the file in the right places.

Another place to ask is on the WiX-users forum.

http://windows-installer-xml-wix-toolset.687559.n2.nabble.com/wix-users-f687560.html

Upvotes: 1

Related Questions