To help you better we need some information from you.
*** Please fill in the fields below. If you leave fields empty or specify 'latest' rather than the actual version your answer will be delayed as we will be forced to ask you for this information. ***
Product, version and build: Powershell Studio 2016, Version 5.3.130
32 or 64 bit version of product: 64 bit
Operating system: Windows 10, Version 10.0.16299 Build 16299
32 or 64 bit OS: 64 bit
*** Please add details and screenshots as needed below. ***
DO NOT POST SUBSCRIPTIONS, KEYS OR ANY OTHER LICENSING INFORMATION IN THIS FORUM
I've just installed Powershell Studio 2016 on my windows 10 PC. Trying to run even the simplest script (like just one line: Write-host "Hello World"), Powershell Studio exit the script with the following output:
>> Running (test.ps1) Script...
>> Platform: V5 64Bit (STA) (Elevated)
Cannot instantiate PowerShell V5 object: 80070002>> Script Ended
I've tried the different solutions offered, like running RegisterControls.exe (didn't help) and uninstall/reinstall Powershell Studio. Nothing helps.
I can run the same script in Powershell ISE, so nothings wrong with the script. I would appreciate some help solving this, so I can begin working with Powershell Studio. Thank you.
Best regards,
Michael.
Cannot instantiate PowerShell V5 object: 80070002
Forum rules
DO NOT POST LICENSE NUMBERS, ACTIVATION KEYS OR ANY OTHER LICENSING INFORMATION IN THIS FORUM.
Only the original author and our tech personnel can reply to a topic that is created in this forum. If you find a topic that relates to an issue you are having, please create a new topic and reference the other in your post.
Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
DO NOT POST LICENSE NUMBERS, ACTIVATION KEYS OR ANY OTHER LICENSING INFORMATION IN THIS FORUM.
Only the original author and our tech personnel can reply to a topic that is created in this forum. If you find a topic that relates to an issue you are having, please create a new topic and reference the other in your post.
Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
- michaelbhansen
- Posts: 10
- Last visit: Mon Nov 12, 2018 12:50 am
- Alexander Riedel
- Posts: 8488
- Last visit: Tue Apr 16, 2024 8:42 am
- Been upvoted: 37 times
Re: Cannot instantiate PowerShell V5 object: 80070002
The error code indicates a missing file.
Navigate to C:\Program Files (x86)\Common Files\SAPIEN Debugger 201x
and please list the files there.
Navigate to C:\Program Files (x86)\Common Files\SAPIEN Debugger 201x
and please list the files there.
Alexander Riedel
SAPIEN Technologies, Inc.
SAPIEN Technologies, Inc.
- michaelbhansen
- Posts: 10
- Last visit: Mon Nov 12, 2018 12:50 am
Re: Cannot instantiate PowerShell V5 object: 80070002
Hi.
Thank you, Alexander, for you reply. The following files exist in the "C:\Program Files (x86)\Common Files\SAPIEN Debugger 2016" folder:
PWSHHelpCtrl2016.dll
PWSHHelpCtrl2016V3.dll
PWSHHelpCtrl2016V5.dll
ScriptDebugger.dll
ScriptDebugger64.dll
ScriptDriver32.exe
ScriptDriver32.exe.config
ScriptDriver32Elevated.exe
ScriptDriver32Elevated.exe.config
ScriptDriver32V2.exe
ScriptDriver32V2Elevated.exe
ScriptDriver64.exe
ScriptDriver64.exe.config
ScriptDriver64Elevated.exe
ScriptDriver64Elevated.exe.config
ScriptDriver64V2.exe
ScriptDriver64V2Elevated.exe
Best regards,
Michael.
Thank you, Alexander, for you reply. The following files exist in the "C:\Program Files (x86)\Common Files\SAPIEN Debugger 2016" folder:
PWSHHelpCtrl2016.dll
PWSHHelpCtrl2016V3.dll
PWSHHelpCtrl2016V5.dll
ScriptDebugger.dll
ScriptDebugger64.dll
ScriptDriver32.exe
ScriptDriver32.exe.config
ScriptDriver32Elevated.exe
ScriptDriver32Elevated.exe.config
ScriptDriver32V2.exe
ScriptDriver32V2Elevated.exe
ScriptDriver64.exe
ScriptDriver64.exe.config
ScriptDriver64Elevated.exe
ScriptDriver64Elevated.exe.config
ScriptDriver64V2.exe
ScriptDriver64V2Elevated.exe
Best regards,
Michael.
- Alexander Riedel
- Posts: 8488
- Last visit: Tue Apr 16, 2024 8:42 am
- Been upvoted: 37 times
Re: Cannot instantiate PowerShell V5 object: 80070002
Do you have 64 or 32 bit selected as platform in PowerShell Studio? Does it make a difference if you change?
Alexander Riedel
SAPIEN Technologies, Inc.
SAPIEN Technologies, Inc.
- michaelbhansen
- Posts: 10
- Last visit: Mon Nov 12, 2018 12:50 am
Re: Cannot instantiate PowerShell V5 object: 80070002
I've tested with all 4 available platforms (V5 32bit and 64bit and V2 32bit and 64bit). But the result is the same.
Br. Michael.
Br. Michael.
- Alexander Riedel
- Posts: 8488
- Last visit: Tue Apr 16, 2024 8:42 am
- Been upvoted: 37 times
Re: Cannot instantiate PowerShell V5 object: 80070002
Ok, so the COM objects are not registered at all or cannot be loaded.
Open an elevated cmd shell in that folder "C:\Program Files (x86)\Common Files\SAPIEN Debugger 2016"
run this:
C:\Windows\Microsoft.NET\Framework64\v4.0.30319\regasm PWSHHelpCtrl2016V5.dll /codebase
This registers the COM object for V5 and 64 bit.
Please let us know what the output of this is.
Open an elevated cmd shell in that folder "C:\Program Files (x86)\Common Files\SAPIEN Debugger 2016"
run this:
C:\Windows\Microsoft.NET\Framework64\v4.0.30319\regasm PWSHHelpCtrl2016V5.dll /codebase
This registers the COM object for V5 and 64 bit.
Please let us know what the output of this is.
Alexander Riedel
SAPIEN Technologies, Inc.
SAPIEN Technologies, Inc.
- michaelbhansen
- Posts: 10
- Last visit: Mon Nov 12, 2018 12:50 am
Re: Cannot instantiate PowerShell V5 object: 80070002
I ran the command, with the following output:
C:\Program Files (x86)\Common Files\SAPIEN Debugger 2016>C:\Windows\Microsoft.NET\Framework64\v4.0.30319\regasm PWSHHelpCtrl2016V5.dll /codebase
Microsoft .NET Framework Assembly Registration Utility version 4.7.2556.0
for Microsoft .NET Framework version 4.7.2556.0
Copyright (C) Microsoft Corporation. All rights reserved.
RegAsm : warning RA0000 : Registering an unsigned assembly with /codebase can cause your assembly to interfere with other applications that may be installed on the same computer. The /codebase switch is intended to be used only with signed assemblies. Please give your assembly a strong name and re-register it.
Types registered successfully
So it registered successfully, but the error running a script in Powershell Studio persists. For good measures, I also tried to register the two other PWSSHHelpCtrl* dll's in same folder. But that didn't solve the isssue.
Br. Michael.
C:\Program Files (x86)\Common Files\SAPIEN Debugger 2016>C:\Windows\Microsoft.NET\Framework64\v4.0.30319\regasm PWSHHelpCtrl2016V5.dll /codebase
Microsoft .NET Framework Assembly Registration Utility version 4.7.2556.0
for Microsoft .NET Framework version 4.7.2556.0
Copyright (C) Microsoft Corporation. All rights reserved.
RegAsm : warning RA0000 : Registering an unsigned assembly with /codebase can cause your assembly to interfere with other applications that may be installed on the same computer. The /codebase switch is intended to be used only with signed assemblies. Please give your assembly a strong name and re-register it.
Types registered successfully
So it registered successfully, but the error running a script in Powershell Studio persists. For good measures, I also tried to register the two other PWSSHHelpCtrl* dll's in same folder. But that didn't solve the isssue.
Br. Michael.
- michaelbhansen
- Posts: 10
- Last visit: Mon Nov 12, 2018 12:50 am
Re: Cannot instantiate PowerShell V5 object: 80070002
Just tried something new. With a simple 1-line script (Hello World), I chose 'Run in Console" (Ctrl-8) instead of just hitting Run (Ctrl-5). In the console window, the script actually runs. It still fails when using "Run" or pressing Ctrl-5.
- michaelbhansen
- Posts: 10
- Last visit: Mon Nov 12, 2018 12:50 am
Re: Cannot instantiate PowerShell V5 object: 80070002
However, trying to run a simple form:
$form1_Load={
#TODO: Initialize Form Controls here
$label1.Text = "Hello World"
}
nothing happens when using Ctrl-8. As I mean to use Powershell Studio to create graphical scripts, I can't just use Ctrl-8.
$form1_Load={
#TODO: Initialize Form Controls here
$label1.Text = "Hello World"
}
nothing happens when using Ctrl-8. As I mean to use Powershell Studio to create graphical scripts, I can't just use Ctrl-8.
- Alexander Riedel
- Posts: 8488
- Last visit: Tue Apr 16, 2024 8:42 am
- Been upvoted: 37 times
Re: Cannot instantiate PowerShell V5 object: 80070002
There is something missing on your system that prevents the control from being instantiated.
Is there anything in the system/application log after you get this error?
Is there anything in the system/application log after you get this error?
Alexander Riedel
SAPIEN Technologies, Inc.
SAPIEN Technologies, Inc.