Click here to Skip to main content
15,891,864 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
Linux and Windows question.

1. I do not want user to launch all ".doc" files (including those he brings in).
2. User tries to launch a file "test.doc". 
3. The password window appears. 
4. If the password is correct, the file is opened. 
Know how?..


What I have tried:

I read this guide: 

http://www.wikihow.com/Create-a-Password-Protected-File-on-Windows-7

The problem is that I want to do it by mask, not just a few known files.
Posted
Updated 8-Jan-17 12:30pm

1 solution

You don't.

Windows doesn't support doing such a thing without rewriting a chunk of the kernel, or at least intercepting I/O functions with a library, such as Detours ($10,000).

Also, how are you going to determine what the user is actually doing? There is absolutely no difference between reading a file to open it and reading a file to copy it. Since a file can also be opened file for read at any time, like when nobody is logged into the console and a virus scanner is doing its thing, how is a password going to be entered by a non-existent user?

I don't know the specifics of Linux but I would imagine the same limitations apply since these are concepts that apply to all modern operating systems.

You're not the first noob to come up with this idea and you won't be the last. What this shows is that you don't understand the security model built into Windows and how it works.

What you described has nothing to do with what was written in the link you posted.
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900