7

Closed

x64 install issues

description

Doesn't register with 64bit version of PowerShell.
 
When installing, I opted to use the Shared Profile, but got the following when I try to run PowerShell:
Windows PowerShell
Copyright (C) 2006 Microsoft Corporation. All rights reserved.
 
Add-PSSnapin : Windows PowerShell snap-in Pscx is not installed on the machine.
At C:\Documents and Settings\Mark\MyDocs\WindowsPowerShell\profile.ps1:38 char:13
  • Add-PSSnapin <<<< Pscx
    Transcript started, output file is C:\Documents and Settings\Mark\MyDocs\WindowsPowerShell\Transcripts\20070102.1
    43613.7364.txt
    [C:\Documents and Settings\Mark]
    1> Get-PSSnapin
     
    Name : Microsoft.PowerShell.Core
    PSVersion : 1.0
    Description : This Windows PowerShell snap-in contains Windows PowerShell management cmdlets used to manage components
          of Windows PowerShell.
     
    Name : Microsoft.PowerShell.Host
    PSVersion : 1.0
    Description : This Windows PowerShell snap-in contains cmdlets used by the Windows PowerShell host.
     
    Name : Microsoft.PowerShell.Management
    PSVersion : 1.0
    Description : This Windows PowerShell snap-in contains management cmdlets used to manage Windows components.
     
    Name : Microsoft.PowerShell.Security
    PSVersion : 1.0
    Description : This Windows PowerShell snap-in contains cmdlets to manage Windows PowerShell security.
     
    Name : Microsoft.PowerShell.Utility
    PSVersion : 1.0
    Description : This Windows PowerShell snap-in contains utility Cmdlets used to manipulate data.
     
    [C:\Documents and Settings\Mark]
    2> Get-PSSnapin -Registered
     
    Name : PowerGadgets
    PSVersion : 1.0
    Description : Generates Charts, Gauges and Maps Gadgets from Windows PowerShell data
    Well the snap-in is registered on my system odd, let's try PowerShell (32bit):
    Windows PowerShell
    Copyright (C) 2006 Microsoft Corporation. All rights reserved.
     
    Transcript started, output file is C:\Documents and Settings\Mark\MyDocs\WindowsPowerShell\Transcripts\20070102.1
    44524.1412.txt
    [C:\Documents and Settings\Mark]
    1> Get-PSSnapin pscx
     
    Name : Pscx
    PSVersion : 1.0
    Description : PowerShell Community Extensions (PSCX) base snapin which implements a general purpose set of cmdlets.
    Works with no troubles.
    Fortunately this is easy to fix, the installer used for Pscx is a 32bit process and doesn't invoke the 64bit version of InstallUtil.exe to register for 64bit processes. Just run the following from your favourite shell:
    [C:\Documents and Settings\Mark]
    1> C:\WINDOWS\Microsoft.NET\Framework64\v2.0.50727\InstallUtil.exe "C:\Program Files (x86)\PowerShell Community Extensions\InstallerCustomAction.dll"
     
    [C:\Documents and Settings\Mark]
    2> C:\WINDOWS\Microsoft.NET\Framework64\v2.0.50727\InstallUtil.exe "C:\Program Files (x86)\PowerShell Community Extensions\pscx.dll"
    Restart PowerShell and everything is good for both 32bit and 64bit PowerShell.
Closed Apr 7, 2008 at 3:53 AM by r_keith_hill

comments

r_keith_hill wrote Jan 3, 2007 at 5:12 AM

Hmm I hope that VS 2005 SP1 fixes this issue because we aren't calling InstallUtil directly. The VS 2005 Setup project is doing that for us, well apparently not on x64 Windows.

jachymko wrote Jan 3, 2007 at 5:55 PM

i am afraid you are expecting too much from SP1... i guess we might create a custom action which would register the snapin using 64-bit installutil, in case the SP1 wouldnt fix it.

however i'm going to try the SP1 once i manage to install it.

r_keith_hill wrote Jan 3, 2007 at 6:42 PM

Yeah I'm afraid you are probably right on expecting too much from SP1. :-(

colinbo wrote Nov 5, 2007 at 3:42 PM

This is a fairly common mistake of a lot of install processes. I hit this as well under Vista x64. With Windows Installer the MSI must be marked as either x86 or x64. Heath Stewart has a number of Windows Installer x64 pointers - http://blogs.msdn.com/heaths/archive/tags/64-bit/default.aspx

Mikey2OZ wrote Mar 26, 2008 at 10:06 PM

I'm running Windows Server 2008 Enterprise RTM on my laptop and I got a very similar problem. My install went to the C:\Program Files (x86) folder, just like it should have.

After checking the Pscx.InstallLog, I noticed a minor problem. I had a permission issue.

System.UnauthorizedAccessException: Access to the registry key 'HKEY_LOCAL_MACHINE\Software\Microsoft\PowerShell\1\PowerShellSnapIns' is denied.

So, all I needed was to get a big sick and beat Vista's security into submission.

FYI: It's not an issue with Vista's security; it's doing exactly what it's designed to be doing. I just refuse to disable the UAC. I got frustrated and did that once, and a couple of days later I ... learned my lesson. So, I live with it, and occasionally, I get to be the one in control. For those that haven't found the "Script Elevation PowerToys" on the TechNet Script site, your letting Vista get the better of you, especially if you're playing with PowerShell.

The post install process apparently runs under the logged on users rights, which the UAC only provides standard users credentials.

So, I Right-Clicked on the PostInstall.cmd file, and then using one of the PowerToys menu choices, I clicked on "Run as Administrator."
I checked the Pscx.InstallLog file again, and there were no errors.

I brought up PowerShell, and I didn't have any of the previous profile errors. So, I ran a couple of the commands from the ReadMe.rtf file, and everything worked great.

r_keith_hill wrote Apr 7, 2008 at 3:52 AM

This has been fixed in the daily bits and will be availalbe in the 1.2 release.