Ultimately, you can’t.
At least you can’t do it easily, and even then, it depends on the data you’re attempting to keep private and the technical savvy of the individuals who might try to access it.
There’s nothing like your own computer. But if you have to share, there are a couple of things that might help.
Become a Patron of Ask Leo! and go ad-free!
Administrators have power
First, realize that anyone with administrative access to the computer can see everything on it.
You can use Windows file permissions to make files accessible to only you, but an administrator could still use any number of techniques to access those files easily.
So if you’re trying to keep things private from other users who have administrative access, normal methods won’t work.
You need more.
If available in your edition of Windows, it’s tempting to consider using the built-in BitLocker encryption, which obscures the data to anyone but the Windows log-in account that owns it. Unfortunately, I can envision ways for an administrator to be able to log in as you and access the files. When it comes to keeping your information safe from other users of the same computer, BitLocker is not something I recommend.1
I frequently recommend VeraCrypt for situations like this, but unless you have administrative rights, it won’t work unless you first convince the administrator to install it for you. If you do have admin rights, then it can be a good solution to secure your data. Only you know the passphrase, you can take your encrypted data to any machine, and you can leave it behind without fear of compromise.
If you don’t have administrative privileges, you need to encrypt your data some other way. One of the simplest might be BoxCryptor. While intended for cloud storage, it works just fine as a local encryption solution, and I don’t believe it requires administrative access. Like VeraCrypt, only you know the passphrase, and you can leave your data behind without fear of compromise.
Other tools aren’t as seamless as we’d like. Tools like WinZip and others encrypt individual files or collections of files, but your encryption must be done manually (decrypt the file to use it, make changes, then re-encrypt), step by step, each time.
No matter how you’ve secured your data, there are still other issues to worry about.
History. Your browser history, your recently-used documents list, temporary files, and more all remain on the computer in areas accessible to the administrator. You’ll want to clear your history after every use so as to leave as little trace as possible. A tool like CCleaner, for example, would probably do the trick, if you can install it and if it has access to what you need cleaned.
Spyware. This is a huge issue on publicly shared computers. You don’t know what’s installed. There may be keystroke loggers or other types of spyware intercepting and recording everything you do. Even with a computer shared between just two people, it’s one easy way person A can spy on person B. It need not be software, either; there are hardware keyloggers that could be installed.
It all comes down to trust
As you can see, there are several issues when sharing a computer.
It all boils down to trust. If you don’t trust the people you share a computer with, you need to take several extra steps to keep your information secure.
And even then, it’s not guaranteed.
In the final analysis, there’s no substitute for your own computer under your own control.
Subscribe to Confident Computing! Less frustration and more confidence, solutions, answers, and tips in your inbox every week.
I'll see you there!
Footnotes & References
1: BitLocker’s great, though, for protecting your data from people who don’t already have an account on the machine, like hackers or thieves.