Sharing The Knowledge

My Photo
Name:
Location: Allahabad, Uttar Pradesh, India

I am a simple guy and prefer to keep life simple

Thursday, May 26, 2011

How to Disable Write Access to USB Hard Disk and Flash Key Drives

There is a registry hack that able to disable the USB drive access to USB mass storage device such as flash drive, USB key, thumb drive, pendrive and portable hard disk while keeping the USB hardware device such as webcam, mouse, keyboard, printer and scanner connected to USB ports working as usual. However, the hack disable the USB access to disk drive completely. User cannot copy data to the USB disk storage, nor able to read any files and documents from the USB drive.

For user who just want to disable write access to the external removable USB mass storage disk drive, there is another registry hack of WriteProtect in StorageDevicePolicies registry key that able to restrict Windows system from writing to the USB disk drive, and hence effectively user to copy any sensitive or private data from the PC to USB key stick. The trick works in a similar way to write-protect feature used in floppy disk and backup tape which make the disk read-only, only that in this case, it’s system wide implementation that block any writing and recording of data to USB mass storage device.

To disable writing access to USB drives and make all USB drives has only read-only access, follow these steps:

Run Registry Editor (regedit).
Navigate to the following registry key:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control

Create a New Key named as StorageDevicePolicies.
Highlight StorageDevicePolicies, and then create a New DWORD (32-bit) Value named as WriteProtect.
Double click on WriteProtect, and set its value data to 1.




Once set, all users on the computer is now blocked and prevented from copying, transferring or writing any files, documents and data to the USB disk drives, without the need to restart or reboot computer. Any attempt to download or copy files to USB drive will return the following error message:

The disk is write protected.
The media is write-protected.
Remove the write protection or use another disk.

To revert and remove the blocked write access to USB drivers, just delete the StorageDevicePolicies registry key, or delete the WriteProtect registry entry, or change the value data for WriteProtect to 0.

For user who doesn’t want to manually editing the registry, simply download the following registry registration files to enable or disable the write protection (block writing attempt) to USB removable drive. Double click the .reg file unpacked from the .zip archive to merge the registry key entries.

Download DisableWriteToUSB.reg
Download EnableWriteToUSB.reg

The trick works in Windows XP SP2 and SP3, Windows Vista, Windows Server 2003 and 2008.

Labels:

Wednesday, October 13, 2010

MS Word stop showing pictures in print layout while it shows in other layouts

It happened with me that MS Word stopped showing pictures in print layout while I put it in another layout and it perfectly shows it. Also it stopped showing name in a change which was made in track changes.

Solution is to reset the registry.

Following link can help :

http://support.microsoft.com/kb/822005

Instead of deleting the registry entry I just renamed it with some other name like Word to Word.old1 and it worked.

Labels: , ,

Saturday, November 21, 2009

Finding ward number in Pune

While filing income tax return online I got this link which is very useful for getting ward number of your location if you are resident of Pune.

http://www.janwani.org/index.php?option=com_sobi2&sobi2Task=search&Itemid=99999999

Labels: ,

Paying electricity bill online in Maharashtra

Hi Friends,

There was a time when I was searching for this option but I couldn't get any link related to this. This is the reason which encouraged me to share it with all.

Link to pay :

http://billing.mahadiscom.in/

You can either login as a registered member(which will off course need you to register on their website) or a quick login.

I usually prefer the quick log in, which will require two information :

- Consumer number
- Billing Unit

Both are available in any of your previous bill. If you don't know how to get it you can use a snapshot, which is available as a link over the label. If you still wouldn't get it, you can leave a note here I would try to help.

I hope this information will be helpful to some extent.

Enjoy

Labels: , , ,

Thursday, September 03, 2009

MS Excel-Combine data from multiple sheets into just one?

Problem:

I have a workbook comprised of 15 sheets of data. The columns of data on each sheet are the same. The rows contain dated information where the sheets are split into different time frames.
I would like to combine all this data into one sheet so that I can sort and graph different items for the entire date period covered by all 15 sheets.
Is there a simple way to accomplish this?


Solution:

The following macro should do the trick. This macro will append the data from the selected worksheet to the end of the active worksheet.

Sub MergeSheets()

' Appends data from all the selected worksheets onto the end of the
' active worksheet.

Const NHR = 1 'Number of header rows to not copy from each MWS

Dim MWS As Worksheet 'Worksheet to be merged (appended)
Dim AWS As Worksheet 'Worksheet to which the data are transferred
Dim FAR As Long 'First available row on AWS
Dim LR As Long 'Last row on the MWS sheets

Set AWS = ActiveSheet

For Each MWS In ActiveWindow.SelectedSheets
If Not MWS Is AWS Then
FAR = AWS.UsedRange.Cells(AWS.UsedRange.Cells.Count).Row + 1
LR = MWS.UsedRange.Cells(MWS.UsedRange.Cells.Count).Row
MWS.Range(MWS.Rows(NHR + 1), MWS.Rows(LR)).Copy AWS.Rows(FAR)
End If
Next MWS

End Sub

To install this macro, go to the VBE (keyboard Alt-TMM), insert a new macro module (Alt-IM), and paste the above code into the Code pane.

Before running the macro select all the sheets you want to merge (Ctrl-click on tab). The active worksheet will be the one that was active before selecting the others.

Source

Labels: , ,

Monday, May 11, 2009

Online Small Games

Makhimar(Flash Game)

http://majman.net/fly_loader.html

Labels:

Saturday, December 06, 2008

SMS forward,Delete in iPhone

iSMS is great tool for it. You can forward SMS delete individual SMS and send sms to multiple recipients.

iSMS Text Messaging Replacement for iPhone

http://www.iphonefaq.org/archives/97332

Forgot my master password for mozilla

This link is important if you will forward the master password

http://support.mozilla.com/en-US/kb/Forgot+my+master+password

Labels:

Wednesday, July 26, 2006

Getting started with Mysql and Connecting it with JDBC

Well I am gonna discuss here my learning experience with mysql.
I don't remember from where I got the setup for mysql. ut I think its not a big deal its freely available on net . The main problem is how to use it..

In the time of installation it will ask about the desired location as example I have choosed c:\mysql . then I need a a Mysql Connector/J.

For example I have downloaded Connector/J 3.1
http://dev.mysql.com/downloads/connector/j/3.1.html

And I downloaded Zip archive my system have Windows XP
I extracted the zip archive which contain a pdf in docs folder (really good one).
and a Jar file .

I included that jar file in my classpath. I was using Kawa IDE so it is very easy to configure the classpath.You have to find a other way if you wanna do it by system .you may try systm environment variables in Window XP for that..

Bow I think its sufficient to write a programme for connecting database through jdbc driver.


A programme for testing the connection


import java.sql.*;

public class Connect
{
public static void main (String[] args)
{
Connection conn = null;

try
{
String userName = "user";
String password = "passwd";
String url = "jdbc:mysql://localhost/mysql";
Class.forName ("com.mysql.jdbc.Driver").newInstance ();
conn = DriverManager.getConnection (url, userName, password);
System.out.println ("Database connection established");
}
catch (Exception e)
{
System.err.println ("Cannot connect to database server");
}
finally
{
if (conn != null)
{
try
{
conn.close ();
System.out.println ("Database connection terminated");
}
catch (Exception e) { /* ignore close errors */ }
}
}
}
}

Sample output


Database connection established

Database connection terminated

Here mysql is the name of my database in
jdbc:mysql://localhost/mysql

and the user name password is user/passwd

I hope its enough for a starter