# How To STOP USB Drive Virus for Forever

**URL:** <https://onehack.st/t/how-to-stop-usb-drive-virus-for-forever/56908>\
**Category:** Tutorials & Methods\
**Tags:** cloud-storage, tips-tricks\
**Created:** [September 12, 2019, 9:47pm UTC](https://onehack.st/t/how-to-stop-usb-drive-virus-for-forever/56908 "2019-09-12T21:47:21Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![TheJoker](https://onehack.st/user_avatar/onehack.st/thejoker/32/22660_2.png) [@TheJoker](https://onehack.st/u/TheJoker)\
**Post date:** [September 12, 2019, 9:47pm UTC](https://onehack.st/t/how-to-stop-usb-drive-virus-for-forever/56908/1 "2019-09-12T21:47:21Z")

</div>

![600-496073128-computer-virus](https://onehack.st/uploads/default/original/3X/2/1/210e0f3d574c98bd4c55b3d5505af34a37cac177.jpeg)

 ![1](https://onehack.st/uploads/default/original/3X/6/0/603b09b7897b25ebab84abe0bd12c47e67ec56b3.png)

> Now this is guide on how to prevent USB Drive Infections.
> 
> **How to make USB-Drive such that autorun virus don’t creep in. Follow the steps and check the pics Below**

- Always Prefer **NTFS formatted** Drives in Windows Environment over FAT32.

- Create a blank notepad file in root of pendrive and save it as Autorun.inf.

 ![2](https://onehack.st/uploads/default/original/3X/d/0/d0f98da293b6ea22f42136c8b1b00b99dfbcaa9f.png)

- Create a invisible folder with no name.

 ![5](https://onehack.st/uploads/default/original/3X/2/4/242590347dce3668d84987efbb92815f8a3c5cb5.png)

- Now change attributes of both folder and file to read only, system file and Hidden by following command

`attrib +s +r +h`

 ![4](https://onehack.st/uploads/default/original/3X/d/6/d695f22f6bb2355587f0479c5bd24276174f01ab.png)

- Now use Cacls Command to make it even more protective by typing the following command and press enter. This command is also used to lock Folders Without Password Or Software

`cacls autorun.inf /e /p everyone:n`

---

<div class="post-metadata">

**Author:** ![Mashkoor\_Vohra](https://onehack.st/letter_avatar_proxy/v4/letter/m/e480ec/32.png) [@Mashkoor\_Vohra](https://onehack.st/u/Mashkoor_Vohra)\
**Post date:** [September 13, 2019, 1:57am UTC](https://onehack.st/t/how-to-stop-usb-drive-virus-for-forever/56908/2 "2019-09-13T01:57:38Z")

</div>

Thanks for sharing @TheJoker. Was looking for tips and now i can prevent my pendrive from getting infected.
