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

ps:SnapIn installation writes to wrong registry key when using PowerShell 3.0. #4524

Open
wixbot opened this issue Sep 10, 2014 · 1 comment

Comments

@wixbot
Copy link

wixbot commented Sep 10, 2014

We have a PowerShell snapin that requires version 3.0 of PowerShell to function. So we used the following file element in a WiX (3.8) file:

    <File Id="MySnapin.dll" 
          Name="MySnapin.dll" 
          Assembly=".net" 
          KeyPath="yes" 
          Vital="no" 
          Checksum="yes" 
          DiskId="1" 
          Source="$(var.FilesPath)\Bin\MySnapin.dll" 
          AssemblyApplication="MySnapin.dll">
       <ps:SnapIn Id="MySnapin" 
                  Description="This is a PowerShell snap-in" 
                  Vendor="My Company Inc." 
                  RequiredPowerShellVersion="3.0">
            <ps:FormatsFile FileId="MySnapin.format.ps1xml" />
       </ps:SnapIn>
    </File>

However, when installing this the snapin cannot be found in powershell (Get-PSSnapIn -Registered). When examining the registry it turns out that the snapin has been registered in HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\PowerShell\3\PowerShellSnapIns\MySnapin. But when running installutil.exe on the DLL, the registration ends up in HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\PowerShell\1\PowerShellSnapIns\MySnapin, and powershell finds it properly. It seems this a bug in WiX Toolset?

Originally opened by decaf

@wixbot
Copy link
Author

wixbot commented Sep 18, 2014

Release changed from v3.8 to v3.x

@wixbot wixbot added this to the v3.x milestone Dec 20, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant