Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

PSHELL and out-of-process servers

Aug
2,134
92
From a 64-bit Powershell, I can use 32-bit Microsoft Excel 2007 as an out-of-process server;
Code:
Windows PowerShell
Copyright (C) 2016 Microsoft Corporation. All rights reserved.

PS C:\utils> [Environment]::Is64BitProcess
True
PS C:\utils> $excel = new-object -com Excel.Application
PS C:\utils> $excel.Version()
12.0
PS C:\utils>

From a 64-bit PowerShell, I can use 32-bit Microsoft Word 2007 as an out-of-process server;
Code:
Windows PowerShell
Copyright (C) 2016 Microsoft Corporation. All rights reserved.

PS C:\utils> [Environment]::Is64BitProcess
True
PS C:\utils> $word = new-object -com Word.Application
PS C:\utils> $word.Version()
12.0
PS C:\utils>

From a 64-bit PowerShell, I can use 32-bit Visual FoxPro 9.0 as an out-of-process server;
Code:
Windows PowerShell
Copyright (C) 2016 Microsoft Corporation. All rights reserved.

PS C:\utils> [Environment]::Is64BitProcess
True
PS C:\utils> $vfp = new-object -com VisualFoxPro.Application
PS C:\utils> $vfp.Version()
9.0
PS C:\utils>

From 64-bit TCC, I cannot use 32-bit Microsoft Excel 2007 as an out-of-process server via PSHELL;
Code:
c:\users\jlc\utils>pshell /s "$excel = new-object -com Excel.Application"
PSHELL: System.Management.Automation.CmdletInvocationException : Retrieving the COM class factory for component with CLSID {00
024500-0000-0000-C000-000000000046} failed due to the following error: 80070005 Access is denied. (Exception from HRESULT: 0x8
0070005 (E_ACCESSDENIED)).

From 64-bit TCC, I cannot use 32-bit Microsoft Word 2007 as an out-of-process server via PSHELL;
Code:
c:\users\jlc\utils>ver

TCC  23.00.28 x64   Windows 7 [Version 6.1.7601]

c:\users\jlc\utils>pshell /s "$word = new-object -com Word.Application"
PSHELL: System.Management.Automation.CmdletInvocationException : Retrieving the COM class factory for component with CLSID {00
0209FF-0000-0000-C000-000000000046} failed due to the following error: 80070005 Access is denied. (Exception from HRESULT: 0x8
0070005 (E_ACCESSDENIED)).

From 64-bit TCC, I cannot use 32-bit Microsoft Visual FoxPro as an out-of-process server via PSHELL;
Code:
c:\users\jlc\utils>ver

TCC  23.00.28 x64   Windows 7 [Version 6.1.7601]

c:\users\jlc\utils>pshell /s "$vfp = new-object -com VisualFoxPro.Application"
PSHELL: System.Management.Automation.CmdletInvocationException : Retrieving the COM class factory for component with CLSID {00
2D2B10-C1FA-4193-B134-D86EAECC5250} failed due to the following error: 80070005 Access is denied. (Exception from HRESULT: 0x8
0070005 (E_ACCESSDENIED)).

As I cannot use 32-bit in-process servers from 64-bit PowerShell, I completely understand that I cannot use 32-bit in-process servers from 64-bit TCC via PSHELL.

However, as I can use 32-bit out-of-process servers from 64-bit PowerShell, I should be able to use 32-bit out-of-process servers from 64-bit TCC via PSHELL.

Joe
 
Hi @rconn
Any word back from the developers of the third-party Powershell library?

Joe
 
Back
Top
[FOX] Ultimate Translator
Translate