Install virtual webcam legacy driver via command prompt

Aswin Bhaarat 1 Reputation point
2021-02-15T05:57:38.487+00:00

The drivers are generated from a piece of code that I have taken from AVStream Hardware Sample (Virtual camera loopback).

https://github.com/Microsoft/Windows-driver-samples/tree/master/avstream/avssamp

I am now trying to install it programmatically using devcon or pnputil but not able to find any batch command or programmatic way to install it. This seem to be a legacy driver. It only works via hdwwiz.exe legacy hardware wizard. My driver is signed properly so no issue there.

The method that works:

  1. C:\WINDOWS\System32\InfDefaultInstall.exe PATH-TO-INF -> I get a pop up after this saying operation successful, but is not listed under Cameras in device manager.
  2. Open Device Manager -> Add legacy hardware -> Next -> Install the hardware that I manually select from a list (Advanced) -> Cameras -> Next -> Select required camera -> Next
  3. Once the above two steps are done, the device is listed under Cameras in device manager, and also I am able to view the same under the list of cameras in applications like Zoom

C:\WINDOWS\System32\InfDefaultInstall.exe PATH-TO-INF -> this is equivalent to Step 1.
But step 2 is what I want to achieve using commands / programmatically.

The following are methods that I have tried:

  1. pnputil /add-driver <PATH-TO-INF> /install -> this adds the INF as oem*.inf but still not listed under cameras, still unusable
  2. devcon.exe install <PATH-TO-INF> ROOT\CAMERA\
  3. devcon.exe install PATH-TO-INF ROOT\CAMERA\0001
  4. devcon.exe /add-driver PATH-TO-INF
  5. devcon.exe install vibe.inf {CLASS-ID}\NameOfDriver

None of the above are helping me to the get result I want.
The drivers are generated from a piece of code that I have taken from AVStream Hardware Sample.

Is there a command in CMD that would help me get the result I want?

Thanks in advance,
Aswin

Windows for business | Windows Client for IT Pros | Storage high availability | Virtualization and Hyper-V
Windows for business | Windows Client for IT Pros | User experience | Other
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Jenny Feng 14,246 Reputation points
    2021-02-15T08:59:02.46+00:00

    Hi,
    I think this is difficult to achieve.
    In addition, here are some posts with the similar issue with yours, just for your reference, you can try the method mentioned in them:
    https://stackoverflow.com/questions/53864109/windows-driver-install-legacy-hardware-with-command-line-tool
    Please note: Information posted in the given link is hosted by a third party. Microsoft does not guarantee the accuracy and effectiveness of information.
    Hope above information can help you.

    ============================================
    If the Answer is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.