I found a quick way to do what I needed.
:loop_begin
start microsoft.windows.camera:
timeout /t 2
taskkill /im WindowsCamera.exe /t /f
timeout /t 2
goto :loop_begin
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
I looking for a way to open & close Windows Camera app from the command line. Use case is to run reliability tests for my camera project and for this I may need to open and close camera app multiple times. If there is a command I was hoping to make a batch script to automate the process.
Thanks!
Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.
I found a quick way to do what I needed.
:loop_begin
start microsoft.windows.camera:
timeout /t 2
taskkill /im WindowsCamera.exe /t /f
timeout /t 2
goto :loop_begin
Hi AshwinN9
I am Dave, I will help you with this, below is the command you need.
start microsoft.windows.camera:
Thanks a lot for your reply Dave.
Let me google around a bit.
Regards!
Hi AshwinN9
No I do not know of a command to do that, usually when an application is loaded into RAM, that then is assigned a Process ID and you would need to find that to end the process, and that process ID would change each time the camera app is opened.
Hi Dave,
Thanks for your reply!
Is there a similar command to stop/close the camera app?
Thanks again!