If you are using XP Home Edition and can't use "gpedit.msc" or if you want to use Registry Editor to disable context menu or if you want to write scripts fot it, then open regedit and goto:
Code:
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer
And in right-side pane, create new DWORD value "
NoViewContextMenu" and set its value to
1.
To disable Taskbar context menu, create new DWORD value "
NoTrayContextMenu" and set its value to
1.
PS: Same things will happen if you'll use gpedit.msc trick mentioned by slugger.