Generate file on USB drive that can not be deleted or copied in VB.NET

963 views Asked by At

I need to generate a file on a USB drive. This file should not be deletable or copy-able and must be generated using VB.net

Basically i have a lot of usb drive, on each drive there will be a file with a specific name and i will use this file to detect what usb is connected. I do not need to open it, i will only read its filename. I know that the file can Always be copied by making a 1:1 copy but that is not a problem. I need to do this via a file because it has to work on multiple systems such as Win CE and that system doesnt tell me the USB drive name.

What i was thinking of is to make a file and corrupt it somehow so it cant be copied or deleted but i am not sure that this works. Any suggestion appreciated.

1

There are 1 answers

5
sharkyenergy On

Solved by putting the file in a system folder.. so its hidden