Skip to content
This repository was archived by the owner on Jun 14, 2024. It is now read-only.
This repository was archived by the owner on Jun 14, 2024. It is now read-only.

CimSession.Create(null) does not work on Windows 7 (x86) #43

Open

Description

Perhaps this is expected. It's hard to find any information about that.

My goal is to get some WMI information out of Windows. System.Management is considered legacy apparently and does not work well with .NET Core when you don't have unspecified version of .NET Framework installed. And the recommended way is to utilize MMI.

It works fine on Windows 10 now but Windows 7 (x86 though not necessarily relevant) fails with not much to go on.

CimSession.Create(null);

Microsoft.Management.Infrastructure.CimException: FAILED
   at Microsoft.Management.Infrastructure.CimException.ThrowIfMiResultFailure(MiResult result, String errorMessage, InstanceHandle errorData)
   at Microsoft.Management.Infrastructure.CimException.ThrowIfMiResultFailure(MiResult result, InstanceHandle errorData)
   at Microsoft.Management.Infrastructure.CimSession.Create(String computerName, CimSessionOptions sessionOptions)
   at Microsoft.Management.Infrastructure.CimSession.Create(String computerName)

Tried both 1.0.0 and 2.0.0-preview2

Activity

  1. shazha commented on Dec 24, 2019

    @shazha

    You need Windows Management Framework 3.0 be installed on Windows 7 SP1. please install .Net Framework 4.0 first as it's required by WMF 3.0.

  2. natnan commented on Dec 24, 2019

    @natnan
    Author

    Right. That is not very ideal as the use case is just simple information gathering from the local system (productid, Windows version etc.) that should ideally be available without installing extra management frameworks. It's especially difficult when it's a desktop application requiring the information where adding such requirements is an overkill.

    I understand the requirement from MMI perspective though, and it that's the way it is, feel free to close the issue.

    Thanks.

  3. valeriob commented on Sep 8, 2020

    @valeriob

    Hi,
    i'm having the same problem, even after i've installed the Windows Management Framework 3.0 on a windows 7 SP1 x64.
    The problem is that it's a windows 7 embedded , peraps there is some more requirement needed ?
    Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions