Well here’s a simple video tutorial to edit the registry. It lacks audio though.
Hope it helps somebody:)
This blog contains random postings on stuff such as: Windows Registry, Command Prompt, Powershell, Programming, facts, etc. Some text might have been borrowed without permission from other users. If anybody has a problem please let me know.
Well here’s a simple video tutorial to edit the registry. It lacks audio though.
Hope it helps somebody:)
To prevent users from changing file associations using the File Types tab in Folder Options, merge the following in the registry:
Windows Registry Editor Version 5.00 [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer] "NoFileAssociate"=dword:00000001
Delete the key to allow changing the associations.
Merge the following into the registry to remove access to shutdown using the Start menu and the task manager.
Windows Registry Editor Version 5.00 [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer] "NoClose"=dword:00000001
You can shutdown using the command prompt or by first logging off. to get it back change the value of NoClose to 0 or delete the key.
To make Explore the first option in the right-click, merge the following to the registry:
Windows Registry Editor Version 5.00 [HKEY_CLASSES_ROOT\Folder\shell] @="explore"
To make Open the first option in the right-click, merge the following to the registry:
Windows Registry Editor Version 5.00 [HKEY_CLASSES_ROOT\Folder\shell] @="open"
You can hide your documents in a JPEG image file.
1) Put your files in a RAR file. You can use WinRAR for that. I'll use abc.rar as an example.
2) Now move this RAR file into a particular folder. I'll use the C:\MyFolder here.
3) Have a JPEG/JPG file (The one in which you want to hide the stuff) in the same folder. I'll use Logo.jpg as an example.
Now in the command prompt navigate to the folder using cd MyFolder
now type this: copy /b Logo.jpg + abc.rar Logo.jpg
Now double-click on the Logo.jpg file it should open with your Picture viewer. To open it as a RAR file you can use open with from the files right-click menu and choose WinRAR Or drag it into WinRAR otherwise the JPG's open with will have a WinRAR entry. To make it more secure I recommend adding a password for the RAR file.
It's frustrating when you share a single PC at your home with your family. By default Google Talk allows only one user to sign in at a time. Here's how you can have multiple instances of Gtalk open to sign in with different accounts.
1) Browse to the directory where you installed Google Talk: C:\Program Files\Google\Google Talk
2) Select the file named 'googletalk.exe' and create a shortcut for it.
3) Open the properties for the shortcut and append its target location with /nomutex
The target: should look like this; "C:\Program Files\Google\Google Talk\googletalk.exe" /nomutex
4) Now run this shortcut whenever you require to open another instance of Google Talk
To forcefully delete files without moving it to the Recycle Bin (Without holding Shift + Delete) :
Merge the following into the registry:
Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\BitBucket] "NukeOnDelete"=dword:00000001
One way is to do it using folder options. The registry way is as follows: To Hide: [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced] "HideFileExt"=dword:00000001
To Show/Unhide: [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced] "HideFileExt"=dword:00000000
If the Desktop (create shortcut) entry is missing from the Send To when you right-click a file you can restore it using the following methods. Method 1:
Type shell:sendto in Start menu>Run.
This will open the Send To folder.
In this folder create a new text file and rename it as Desktop (create shortcut).DeskLink
Method 2:
Use the following command in Start Menu>Run or the Command Prompt: regsvr32 sendmail.dll
To prevent users from using My Computer, Explorer, Run, Map Network Drive to access the content of selected drives:
In the Windows Registry Editor (regedit) navigate to: HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer
Create a new DWORD Value named: NoViewOnDrive
The value for NoViewOnDrive needs to be calculated as follows:
A drive that needs to be hidden is represented by a binary 1.
ZYXWVUTSRQPONMLKJIHGFEDCBA
00000000000000000000100000
For example to hide drive F the value for NoDrives = 20 in hexadicimal
Windows Registry Editor Version 5.00 [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer] "NoViewOnDrive"=dword:00000020
To hide all drives except C, D and E the binary value is 11111111111111111111100011
So the value for NoDrives will be: 3FFFFE3
If a user tries to access the drive he will get a restriction warning stating "This operation has been cancelled due to restrictions in effect on this computer. Please contact your system administrator."
When you right-click the My Documents folder icon in the Desktop or Start Menu, you get an option to change its target location. To disable changing this target location merge the following into the registry:
Windows Registry Editor Version 5.00 [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer] "DisablePersonalDirChange"=dword:00000001
To re-enable it delete the "DisablePersonalDirChange" from the registry.
Use the following to restrict the remaining:
DisablePersonalDirChange - Restrict changes to My Documents DisableMyPicturesDirChange - Restrict changes to My Pictures DisableMyMusicDirChange - Restrict changes to My Music DisableFavoritesDirChange - Restrict changes to Favorites
Import the following into the registry:
Windows Registry Editor Version 5.00 [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer] "NoPropertiesRecycleBin"=dword:00000001 [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\policies\Explorer] "NoPropertiesRecycleBin"=dword:00000001
Paste the following in notepad and save it with the .reg extension:
Windows Registry Editor Version 5.00
[-HKEY_CLASSES_ROOT\CLSID\{EF8AD2D1-AE36-11D1-B2D2-006097DF8C11}] [-HKEY_CLASSES_ROOT\CLSID\{B091E540-83E3-11CF-A713-0020AFD79762}] [HKEY_CLASSES_ROOT\CLSID\{EF8AD2D1-AE36-11D1-B2D2-006097DF8C11}] @="Global Folder Settings" [HKEY_CLASSES_ROOT\CLSID\{EF8AD2D1-AE36-11D1-B2D2-006097DF8C11}\InProcServer32] @=hex(2):25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,6f,00,6f,00,74,00,25,\ 00,5c,00,73,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,62,00,72,00,\ 6f,00,77,00,73,00,65,00,75,00,69,00,2e,00,64,00,6c,00,6c,00,00,00 "ThreadingModel"="Both" [HKEY_CLASSES_ROOT\CLSID\{B091E540-83E3-11CF-A713-0020AFD79762}] @="File Types Page" [HKEY_CLASSES_ROOT\CLSID\{B091E540-83E3-11CF-A713-0020AFD79762}\InProcServer32] @=hex(2):25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,6f,00,6f,00,74,00,25,\ 00,5c,00,73,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,53,00,48,00,\ 45,00,4c,00,4c,00,33,00,32,00,2e,00,64,00,6c,00,6c,00,00,00 "ThreadingModel"="Apartment"
Now merge it with the registry.
Here's the command to enable registry editing using the command prompt/run dialog box:
REG add HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\System /v DisableRegistryTools /t REG_DWORD /d 0 /f
Here's another way to enable it by using a vb script: http://punkisnail.blogspot.com/2009/01/enable-regedit-using-vb-script.html
The following steps show how to restore the 'Show desktop' entry in the quick launch toolbar. Open Notepad and type/paste the following code:
[Shell] Command=2
IconFile=explorer.exe,3
[Taskbar] Command=ToggleDesktop
Save the file with a .scf extension in the quick launch folder.
Here's the path to the quick launch folder: C:\Documents and Settings\[USERNAME]\Application Data\Microsoft\Internet Explorer\Quick Launch
Another method is to type this command in run or the command prompt: regsvr32 /n /i:U shell32.dll
To remove the New option: In the registry editor navigate to: [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Directory\Background\shellex\ContextMenuHandlers\New]
In the right column you'll find a REG_SZ value named (Default) whose data equals: {D969A300-E7FF-11d0-A93B-00A0C90F2719} Delete this (Default) value. That's it.
Now right click on the desktop and check if the menu has an entry named 'New'.
To restore the New option import the following in the registry: Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Directory\Background\shellex\ContextMenuHandlers\New] @="{D969A300-E7FF-11d0-A93B-00A0C90F2719}"
To remove access to the Folder Options in explorer import the following into the registry:
Windows Registry Editor Version 5.00 [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Group Policy Objects\{BE399983-1586-4348-BDDA-08DCCADB3A6B}User\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer] "NoFolderOptions"=dword:00000001
Log Off to apply the settings. To restore the folder options Change the dword value to 00000000
To disable access to the command prompt import the following into the windows registry:
Windows Registry Editor Version 5.00 [HKEY_CURRENT_USER\Software\Policies\Microsoft\Windows\System] "DisableCMD"=dword:00000001
Now if the user tries to open the command prompt he will get a notification stating: "The command prompt has been disabled by your administrator".
To re-enable access to the command prompt use the following: Windows Registry Editor Version 5.00 [HKEY_CURRENT_USER\Software\Policies\Microsoft\Windows\System] "DisableCMD"=dword:00000000
Open notepad and paste the following and save it with a '.reg' extension
Windows Registry Editor Version 5.00 [HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main] "Window Title"="Hello punkisnail"
Use your own text instead of Hello punkisnail. Import the file into the windows registry and check it out.
Handling arrow keys on a VB windows form is a pain until you find a solution that works according to your needs:) Well I posted this coz I got excited having solved a problem I had with detecting the arrow keys in VB.NET. I've been struggling to detect the arrow keys on a windows application form that I was designing in VB 2008.
The form contained a TabControl and needed to detect the keys only on TabPage1. Since there were many other controls on the form I had to use an overriding function.
i.e:
Protected Overrides Function ProcessCmdKey(ByRef msg As Message, _ ByVal keyData As Keys) As Boolean
' detect which key is pressed and perform some action
End Function
The problem is that TabPage2 contained a textbox and would allow me to enter only a single character. To continue typing into the textbox I needed to click in the textbox and type the next character. To overcome this problem I needed to check which TabPage had the focus. But the problem was where to check the focus.
Download my code to find out how I solved my problem: http://www.mediafire.com/?wnw3zduymtj Hopefully someone finds this post useful.
To disable changing the hidden files and folder settings in Folder Options:
Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced\Folder\Hidden\SHOWALL] "CheckedValue"=dword:00000000
To disable showing hidden files and folders:
Windows Registry Editor Version 5.00 [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced] "Hidden"=dword:00000000
To disable showing superhidden files and folders:
Windows Registry Editor Version 5.00 [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced] "ShowSuperHidden"=dword:00000000
To enable changing the hidden files and folder settings in Folder Options:
Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced\Folder\Hidden\SHOWALL] "CheckedValue"=dword:00000001
To enable showing hidden files and folders:
Windows Registry Editor Version 5.00 [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced] "Hidden"=dword:00000001 To enable showing superhidden files and folders: Windows Registry Editor Version 5.00 [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced] "ShowSuperHidden"=dword:00000001
If you use the Get-PSDrive cmdlet you'll notice that HKCU and HKLM appear as drives. This allows us to use item cmdlets to manage items in the HKLM: and HKCU: drives.
To change your location to the HKCU: drive use either Set-Location HKCU: or cd HKCU:
To navigate through the registry drive: you can use cd the same way you would use it to navigate through directories in the command prompt. You can also use Set-Location
Example to navigate to HKCU/Control Panel/Desktop
PS HKCU:\> Set-Location "HKCU:/control panel/desktop"
or
PS HKCU:\> cd "HKCU:/control panel/desktop"
To view subkeys: Use either dir or Get-ChildItem
To create a new registry key:
To create a new registry key within a subkey we can use the New-Item cmdlet
For example, to create a key named PUNKISNAIL under hkcu/control panel/desktop
PS HKCU:\control panel\desktop> New-Item PUNKISNAIL
To delete a registry key:
Here we can use the remove-item cmdlet.
For example to delete the key PUNKISNAIL which we created under hkcu/control panel/desktop use:
PS HKCU:\control panel\desktop> remove-item PUNKISNAIL
If you're in a different drive you can use the following to delete the key:
PS C:\>remove-item -path "hkcu:/control panel/desktop/punkisnail"
To get the registry entries in a key:
Here we can use the Get-ItemProperty cmdlet.
To get the properties for menushowdelay found in HKCU/Control Panel/Desktop use: Get-ItemProperty -path "hkcu:/control panel/desktop" -name menushowdelay
To create a registry entry use:
new-itemproperty -path somepath -name someEntryName -value AnyValue -propertyType SomeType Example: new-itemproperty -path "HKCU:/control panel/desktop/punkisnail" -name MyNameIs -value "Shane Lobo" -propertyType string
possible property types are: String, ExpandString, Binary, DWord, MultiString, QWord, Unknown
To clear the value of a registry entry use:
Clear-ItemProperty Clear-ItemProperty -path SomePath -name SomeEntryName
To delete a registry entry use:
remove-ItemProperty remove-ItemProperty -path SomePath -name SomeEntryName
To kill a process in the command prompt we need to know either its Image Name or Process ID. One way to find this is in the Windows Task Manager. The other way is to use the Tasklist command in the command prompt.
Command to kill a process in Windows XP Pro:
taskkill [/pid processID
/pid processID Specifies the process ID of the process to be terminated.
/im
Use the wildcard character (*) to specify all image names.
/f Specifies that processes be forcefully terminated.
/t Terminates the specified process and any child processes started by it.
Example: taskkill /im notepad.exe
Command to kill a process in Windows XP Home Edition: Windows XP Home Edition users can use the tskill command as follows: tskill {processID
Example: tskill notepad
To know the contents of a particular registry key or a particular value:
REG QUERY KeyName [/v ValueName | /ve] [/s]
/v Specifies the registry value name that is to be queried.
/ve Runs a query for value names that are empty.
/s Specifies to query all subkeys and value names recursively. Example to query the value of menushowdelay at HKCU/control panel/desktop
reg query "hkcu/control panel/desktop" /v menushowdelay
To add new registry keys:
REG ADD KeyName [/v ValueName | /ve]
[/t Type]
[/d Data] [/f]
/t
Specifies the type for the registry entry which must be one of the following: REG_SZ REG_MULTI_SZ REG_DWORD_BIG_ENDIAN REG_DWORD REG_BINARY REG_DWORD_LITTLE_ENDIAN REG_LINK REG_FULL_RESOURCE_DESCRIPTOR REG_EXPAND_SZ
/d Specifies the data for the new registry entry.
/f Adds the registry entry without prompting for confirmation.
Example to change the value of menushowdelay to 0:
reg add "hkcu/control panel/desktop" /v menushowdelay /t REG_SZ /d 0
To delete registry keys:
REG DELETE KeyName [/v ValueName | /ve | /va] [/f]
/va
Deletes all entries under the specified subkey. Subkeys under the specified subkey are not deleted.
to export and import registry keys:
To export: REG EXPORT KeyName FileName
To import:
REG IMPORT FileName
Syntax/s Applies attrib and any command-line options to matching files in the current directory and all of its subdirectories.
attrib [{+|-}r] [{+|-}a] [{+|-}s] [{+|-}h] [{+|-}i] [drivethe Read-only file attribute. :][path ][ fileName] [/s [/d] [/l]]
+ is for setting the attribute
- is for clearing an attribute
r is for
a is for the Archive file attribute.
s is for the System file attribute.
h is for the Hidden file attribute.
i is for the Not Content Indexed file attribute.
/d Applies attrib and any command-line options to directories.
/l Applies attrib and any command-line options to the Symbolic Link, rather than the target of the Symbolic Link.
If a file has the System (s) or Hidden (h) attribute set, you must clear the attribute before you can change any other attributes for that file.
Examples:
To assign the Read-only attribute to the file named Report.txt, type:
attrib +r report.txt
To remove the Read-only attribute from files in the Public directory and its subdirectories on a disk in drive B, type:
attrib -r b:\public\*.* /s
To configure how a service starts: sc config servicename start= {auto|demand|disabled}
use auto for services that need to automatically start each time the computer is restarted.
use demand for services that need to be started manually.
use disabled for services that need to be disabled/prevented from starting..
To create a text list of running services use the command:
sc query > serviceslist.txt
To create a list of all services, use:
sc query type= service state= all > allserviceslist.txt
To start, stop, pause and resume services:
To start a service, type:
net start servicename
To stop a service, type:
net stop servicename
To pause a service, type:
net pause servicename
To resume a service, type:
net continue servicename
servicename Specifies the short name of the service.
To get the short name of the service from the descriptive name (Example for Remote Registry): sc getkeyname "Remote registry"
Download a list of short names for services: http://www.mediafire.com/?zfmyzd5yjzy
To get the IP automatically using DHCP use this command:
netsh int ip set address "local area connection" dhcp
To get the DNS server address automatically:
netsh int ip set dns "local area connection" dhcp
To set a static IP address use this command:
netsh interface ip set address "Local Area Connection" static ipaddr subnetmask gateway metric
NOTE: Replace ipaddr with the static IP address, subnetmask with the subnet mask, gateway with the default gateway and, if necessary, metric with the appropriate metric.
The following example changes the interface "Local Area Connection" to a static address of 192.168.0.10 with a subnet mask of 255.255.255.0, and the interface has a default gateway of 192.168.0.1 with a metric of 1:
To change the DNS server address use:
netsh int ip set dns "local area connection" static 192.168.0.254 primary
To add more DNS server addresses entries use:
netsh int ip add dns "local area connection" 192.168.1.254
If the Send To option is missing in the context menu when you right-click on a file use the following:
Paste the following in notepad and save it with a '.reg' extension. Windows Registry Editor Version 5.00 [HKEY_CLASSES_ROOT\AllFilesystemObjects\shellex\ContextMenuHandlers\Send To] @="{7BA4C740-9E81-11CF-99D3-00AA004AE837}"
Merge it with the registry.
Paste the following in notepad and save it with a '.reg' extension. Windows Registry Editor Version 5.00 [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer] "NoManageMyComputerVerb"=dword:00000001
Merge it with the registry.
to undo the change delete the "NoManageMyComputerVerb" key from the registry.
The control panel applets are stored in the X:\WINDOWS\system32 folder.
X: represents the drive where you have installed windows.
Open regedit. Navigate to HKEY_CURRENT_USER\Control Panel\don't load
Insert a new String value and rename it with the applets name that you want to hide. Give it the value: No
For example to hide 'Add or Remove Programs' from the Control Panel insert the following in Notepad and save it with a '.reg' extension. Windows Registry Editor Version 5.00 [HKEY_CURRENT_USER\Control Panel\don't load] "appwiz.cpl"="No" Merge it with the registry. To undo delete the concerned key from the registry.
Paste the following in notepad and save it with a '.reg' extension.
Windows Registry Editor Version 5.00 [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer] "NoViewContextMenu"=dword:00000001 [HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer] "NoViewContextMenu"=dword:00000001
Merge it with the registry. To undo it delete the "NoViewContextMenu" from the registry.
Paste the following in notepad and save it with a '.reg' extension.
Windows Registry Editor Version 5.00 [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer] "NoPropertiesMyComputer"=dword:00000001
Merge it with the registry.
To undo the effect delete the "NoPropertiesMyComputer"from the registry.
Paste the following in notepad and save it with a '.reg' extension.
Windows Registry Editor Version 5.00 [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer] "NoTrayContextMenu"=dword:00000001
Merge it with the registry.
To allow right-clicking on the taskbar delete the "NoTrayContextMenu" key from the registry.
Paste the following in notepad and save it with a '.reg' extension. Windows Registry Editor Version 5.00 [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer] "NoRun"=dword:00000001
to renable it delete the "NoRun" key from the registry.
Paste the following in notepad and save it with a '.reg' extension. Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\policies\system] "DisableTaskMgr"=dword:00000001 [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\System] "DisableTaskMgr"=dword:00000001
To re-enable the task manager delete the "DisableTaskMgr" key from the registry.
Paste the following in Notepad and save it with a '.reg' extension. Windows Registry Editor Version 5.00 [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer] "NoControlPanel"=dword:00000001 [HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer] "NoControlPanel"=dword:00000001
Now merge it with the windows registry. To enable opening the control panel delete the "NoControlPanel" key in the registry.
Paste the following in Notepad and save it with a '.reg' extension. Windows Registry Editor Version 5.00 [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer] "link"=hex:00,00,00,00 [HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Explorer] "link"=hex:00,00,00,00
Now merge it with the registry.
To undo the effect replace the value of "link" with "link"=hex:01,00,00,00
Method 1: One way to do this in Windows XP professional is through gpedit.msc
Start>Run... type: gpedit.msc
In the 'Group Policy' window expand 'User Configuration' expand 'Admininstravive Templates' and select 'System'
Double-click 'Prevent access to registry editing tools' in the pane towards the right.
Choose 'Enabled' and apply.
Method 2: The second way is to use the registry itself. To disable it for the current user: [HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System] "DisableRegistryTools"=dword:00000001
To disable it for all users: [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System] "DisableRegistryTools"=dword:00000001
If one tries to run regedit after applying this tweak a message box will appear stating "Registry editing has been disabled by your administrator"
This will hide a particular drive in My Computer, Explorer, Send To, ... In the Windows Registry Editor (regedit) navigate to: HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer
Create a new DWORD Value named: NoDrives
The value for NoDrives needs to be calculated as follows:
A drive that needs to be hidden is represented by a binary 1.
ZYXWVUTSRQPONMLKJIHGFEDCBA
00000000000000000000100000
For example to hide drive F the value for NoDrives = 20 in hexadicimal To hide all drives except C, D and E the binary value is 11111111111111111111100011 So the value for NoDrives will be: 3FFFFE3
To disable the detection of USB Storage devices paste the following in notepad and save it with a '.reg' extension.
Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\USBSTOR] "Start"=dword:00000004
merge it with the Windows registry.
To re-enable the detection of USB storage devices use:
Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\USBSTOR] "Start"=dword:3
You can use this to prevent data theft through the USB port. Paste the following in notepad and save it with a '.reg' extension.
Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\StorageDevicePolicies] "WriteProtect"=dword:00000001
Then merge it with the windows registry.
Many viruses spread through removable storage drives using the drives autorun feature. For example as soon as one inserts the USB drive an autorun.inf file that links to the virus gets executed.
To disable automatically running this autorun.inf file use the following steps:
1) If you use Windows XP Professional:
click Start>Run... type:
gpedit.msc and hit Enter. This will open a 'Group Policy' window. Expand: 'Computer Configuration' then expand 'Administrative Templates' Select 'System' and in the pane towards the right look for 'Turn off Autoplay'. Double-click 'Turn off Autoplay' and choose 'Enabled'. Where it says 'Turn off autoplay on:' choose 'All Drives' . Click 'Apply' and 'OK' Follow the same steps by expanding 'User Configuration'
2) In case your version of windows does not run gpedit.msc try the following method that uses the Windows Registry:
open Notepad and paste the following in it:
Windows Registry Editor Version 5.00 [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer] "NoDriveTypeAutoRun"=dword:000000ff
Save the file with a '.reg' extension and double-click the file. You might be prompted to merge it with the registry. Agree to do so.
Note : if you double-click the drive it might still execute the autorun.inf file.
A safer option to open drives is to use the Windows Explorer View (WinKey + E). Or maybe you'll need to import this in the registry too: Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Cdrom] "AutoRun"=dword:00000000
I'm not too sure but I guess the above tweak removes the Autoplay entry from the CDROM context menu.