Webcam Test

TekieG

New Member
I have a custom Win10 image for a bunch of Lenovo machines that I am going to sell. The current image does the following, it installs Basic WinOS, Drivers, and during SetupComplete.CMD it'll call a PowerShell script that will fetch me the specs of the machine and display them. I would like to also automate to open a windows or webpage that will access the webcam and microphone to make sure they are working as well as test all the keys on the keyboard, so I can add it to my inventory notes.

Getting the specs have been working flawlessly. However, I can't seen to figure out a way to test the webcam, microphone, or keyboard. I tried using "Add-AppxPackage -register appxmanifest.xml_file_path -DisableDevelopmentMode" however, this is not allowed by a Local System account during SetupComplete.CMD, I can't seem to Launch Edge to take me to the website as it doesn't open and Internet Explorer is well deprecated and doesn't work with webcamtests.com, onlinemictest.com, or most websites. Does anyone have any idea what else I can try? I would prefer via powershell and native things from the OS but if I have to go to a website then so be it. I just want to test that everything works, documented. I don't want to sell a laptop that has a broken webcam, and microphone doesn't work.
 
There are two challenges to this problem, and both require the same approach.

1. While you can provision UWP packages on a live system as SYSTEM or Admin, those packages cannot be added for a non-interactive user. Provisioning is installing the package on Windows, but each package needs to be registered to the user's environment.

Therefore you must wait until after the first user logon to get a proper environment.

2. Post-Setup (Machine) commands are run by SetupComplete.cmd during the post-OOBE phase. Windows disallows any keyboard or mouse input, and hides everything behind an OOBE splash screen.

Therefore your browser won't be displayed, nor any functional tests can be carried out while SetupComplete is running.

You can add these commands to Post-Setup (User) and have them open Edge on logon:
Code:
start microsoft-edge:http://webcamtests.com
start microsoft-edge:http://onlinemictest.com
 
Back
Top