Creating a secure test environment for a programming lab practical
As already outlined in some of the comments, it is impossible to achieve what you want: You cannot control a computer to this extent without a severe invasion that would go far beyond anything that I would allow you to do on my computer due to privacy and security concerns. Unless you want to video-monitor students, you can also not prevent students from using a second computer, a virtual machine, or having somebody else working on their computer for them. And even then you need at least two cameras to see everything that the student is doing or that is happening to them and you would have to frequently check that they are working themselves, did not rig the video, etc.

On a more general level, controlling cheating on any exam that is based on limiting resources is already difficult if you do it in a setting that you can control (i.e., your room, your computers, your toilets, etc.).
By taking this battle to the “enemy’s territory” and limiting your knowledge, you can only lose.

I would thus suggest the following alternative.
This is how my programming practicals were done when I was a student.
I also successfully applied this to a programming “exam” in a course I co-organised.


The students do the programming practical with no restrictions except time.
For example, they may use the entire Internet, course material, etc.
After they submit the code, there is a short oral exam on the code.
Depending on the details of your course, you can very this exam in length and relevance, with the extreme examples being:


You grade the code and the oral exam only serves to ensure that the students didn’t cheat (and may be as short as five minutes).
You only check that the code is doing what it’s supposed to do, while the oral exam determines the grade and may also contain questions about other aspects of the course and deeper understanding.
Here, the oral exams may cost more time, but you also spend less time looking at their submissions.

If applicable, also perform plagiarism checks on the code.


Some pros and cons of this approach:


You somehow have to organise remote oral exams, but these could be just via the phone, if that suffices to establish the examinee’s identity for you. Also be prepared that this mode will amplify anxiety, language, and other issues for some students (while it reduces them for others).
You may need to modify your tasks to account for full Internet access and similar, for example it should not be anything to which a bazillion of solutions exists.
Depending on your topic, this may be very difficult.
The exam is more realistic: except for taking exams, your students will have Internet access for the rest of their career and using it properly is also a relevant skill.
The oral exam allows you to gauge actual understanding, whereas the purely written exam may be solved by rote-memorising algorithms, etc.   
In case of group work, you do not need to worry much about some incompetent student benefiting from a stronger partner.
(I am aware that this point doesn’t apply to you; I mention it only for completeness.)