How to hide using C\C++ with Show hidden Files and Folder enabled

11,113

Solution 1

I am pretty sure this is not possible as it would be a security vulnerability (programs could place unknown files on your hard drive that you couldn't see or delete).

Even Windows system files are visible.

Solution 2

There is NO user mode API to make files hidden from 'show hidden files', and it's a good thing to.

The only way to do this is to get your code to run in the kernel. The rootkit that Sony "accidently" installed on user machines a couple years ago when they were trying to prevent CDs from being rippable could do it. But there is no legitimate use for the ability to hide files from system administrators and power users.

Solution 3

Use a file system filter driver. But since you have to ask - just don't do it. Not trying to be rude here, it's just that that is a task that is very hard to get right.

Share:
11,113
Admin
Author by

Admin

Updated on June 14, 2022

Comments

  • Admin
    Admin almost 2 years

    I would like to know how to programmatically hide a file but making the file or folder still hidden with Show hidden files and folders enabled from the Tools->Folder options of Explorer.