Make pendrive read-only, how can I do in FiveWin?

Make pendrive read-only, how can I do in FiveWin?

Postby sambomb » Thu May 21, 2009 12:24 pm

Hi, I want to make a .exe to make a pendrive read-only and disable it, and make a autorun to run this exe when plug in any PC...

I need this because I can't thrust in the integrity of my clients PC's, and I'm having trouble with viruses
Email: SamirSSabreu@gmail.com
MSN: SamirAbreu@hotmail.com
Skype: SamirAbreu
xHarbour 1.1.0 + FwXh 8.02
xHarbour 1.2.1 + Fwhh 10.6
User avatar
sambomb
 
Posts: 385
Joined: Mon Oct 13, 2008 11:26 am
Location: Itaocara - RJ - Brasil

Re: Make pendrive read-only, how can I do in FiveWin?

Postby anserkk » Fri May 22, 2009 5:10 am

Dear Mr.Samir,

make a autorun to run this exe when plug in any PC...

The trick to Run your exe automatically whenever the Pen drive plugged in to any PC is AutoRun.Inf file. The file AutoRun.Inf should be placed in the root folder of your PenDrive

Here is the sample contents of an AutoRun.Inf

[autorun]
open=YourApplication.exe
icon=YourApplication.ico

I want to make a .exe to make a pendrive read-only and disable it


There may be cases where we may want to connect our USB flash / pen drive to computers only for reading the data from it. If the host computer in which you plug your USB drive may be infected and may infect your USB flash drive. If the USB drive is only being connected for data reading purposes then it makes sense to make them write protected (read only) so that the Viruses won’t be able to infect the drive.

Certain USB flash / pen drives come with write protector switch in them, using which you can write protect the USB flash / pen drive or make them read only drives. If the write protect feature is missing in the USB flash / pen drive then you can use USB Write Protector utility.

USB Write Protector is a free utility that allows you make write protect your USB flash / pen drives. This is a very small utility that you can always carry with you in your portable drive.

Note: This utility does not make your USB drive write protected rather it makes the host computer on which this utility is run unable to write to removable storage media like USB flash drives.

http://www.gaijin.at/dlusbwp.php

You can also write Protect the USB Drive using some tweaks in the registry. The drawback of this trick is that you need to remember this trick by yourself and you need to restart the PC after applying this trick.

1. Open Registry Editor by Start > Run.
2. Type in regedit.
3. Browse to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\
4. Locate the sub-key StorageDevicePolicies. If it doesn’t exist then create it first. Create a new key under Control by right clicking on it so that you don’t create it elsewhere by mistake
5. Right click in the blank area of the sub key you just created and create a new DWORD value by the name WriteProtect.
6. Double-click it and set the value data as 1
7. Click OK, close the Registry Editor and restart the PC.

It is only some registry tweaks, so you can do the same from your FiveWin

Regards
Anser
User avatar
anserkk
 
Posts: 1330
Joined: Fri Jun 13, 2008 11:04 am
Location: Kochi, India


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 32 guests