Windows System Software -- Consulting, Training, Development -- Unique Expertise, Guaranteed Results


More Info on Driver Writing and Debugging

The free OSR Learning Library has more than 50 articles on a wide variety of topics about writing and debugging device drivers and Minifilters. From introductory level to advanced. All the articles have been recently reviewed and updated, and are written using the clear and definitive style you've come to expect from OSR over the years.

Check out The OSR Learning Library at:

Before Posting...

Please check out the Community Guidelines in the Announcements and Administration Category.

How to automate HLK tests using powershell or C#

ksupallksupall Member Posts: 28

Hello, NTDEV!
I want to automate HLK tests as they take me so much time.
I found C# and PowerShell examples here, but when I launched it in my project I got so many errors:
using Microsoft.Windows.Kits.Hardware.ObjectModel;
using Microsoft.Windows.Kits.Hardware.ObjectModel.DBConnection;
using Microsoft.Windows.Kits.Hardware.ObjectModel.Submission;

error CS0234: The type or namespace name 'Windows' does not exist in the namespace 'Microsoft'

$ObjectModel = [Reflection.Assembly]::LoadFrom($env:WTTSTDIO + "Microsoft.Windows.Kits.Hardware.objectmodel.dll")
$ObjectModel = [Reflection.Assembly]::LoadFrom($env:WTTSTDIO + "Microsoft.Windows.Kits.Hardware.objectmodel.dbconnection.dll")
$ObjectModel = [Reflection.Assembly]::LoadFrom($env:WTTSTDIO + "Microsoft.Windows.Kits.Hardware.objectmodel.submission.dll")
Could not load file or assembly or one of its dependencies. The specified file cannot be found.

What's wrong?


  • CaptainFlintCaptainFlint Member Posts: 73

    Cannot tell about C#, I've never tried it. With PowerShell you need to make sure, that you are using the correct architecture. For HLK you have to run the 64-bit version of PowerShell; for HCK it must be the 32-bit version.

    Take a look at this project:
    It is used as a part of AutoHCK toolset designed for automated HCK/HLK test runs. This toolsHCK script is installed and launched on the Controller system; it then waits for commands to be sent into it, and performs them (like creating a project, a pool, adding tests, etc.).

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. Sign in or register to get started.

Upcoming OSR Seminars
OSR has suspended in-person seminars due to the Covid-19 outbreak. But, don't miss your training! Attend via the internet instead!
Writing WDF Drivers 24 January 2022 Live, Online
Internals & Software Drivers 7 February 2022 Live, Online
Kernel Debugging 21 March 2022 Live, Online
Developing Minifilters 23 May 2022 Live, Online