Link to home
Start Free TrialLog in
Avatar of WerewolfTA
WerewolfTA

asked on

Remove the new shortcut item from the context menu

I want to be able to remove the new shortcut item from the Windows Explorer context menu from my users.  I still want them to be able to send items in their my documents folder to the desktop as a shortcut and don't want to completely remove the context menu.  Can't figure out where that key is in the registry and don't see that option as part of the options of a group policy object (where I'd prefer to set the option).  Help!
Avatar of Gareth Gudger
Gareth Gudger
Flag of United States of America image

What item are you trying to remove?
Avatar of WerewolfTA
WerewolfTA

ASKER

The item that lets them create a new blank shortcut (r. click -> new -> shortcut) on the desktop.
c:\documents and settings\[username]\SendTo holds all of those context menu items - just delete "Send to Desktop".  I don't know if there's an easier way to remove other than going through each user's folder individually - maybe a quick batch file would do the trick.

Also, I'm assuming that making the change for "Default User" would put the change into effect for all new users you create.
The easiest way would be to integrate that into the logon script. Assuming that you don't want this to apply to all users, you might want to use ifmember.exe (a free W2k Resource Kit tool) to check if the user is member of a certain group ("GRemoveSendTo" in the example) and then delete the link only when the user is a member.

====8<----[logon.cmd]----
@echo off
:: *** Check if the user is member of the group that has the Desktop-SendTo deleted;
:: *** note that ifmember returns errorlevel 1 if the user *is* member!
ifmember.exe GRemoveSendTo
if not errorlevel 1 goto DeleteEnd
if exist "%UserProfile%\SendTo\*.desklink" del "%UserProfile%\SendTo\*.desklink"
:DeleteEnd
====8<----[logon.cmd]----

Resource Kits Free Tool Downloads: Ifmember.exe
http://www.microsoft.com/windows2000/techinfo/reskit/tools/new/ifmember-o.asp
Thanks for the feedback.  However, I guess that I wasn't being clear.  I'm not looking to modify the list of places a shortcut can be sent to.  What I'm looking at is when you right click a blank area of your desktop or a blank area in your my documents folder, there's a "new" item in that context menu that pulls out a submenu with folder, shortcut, briefcase, etc., etc. in it.   It's that 2nd item in the submenu, "shortcut", that I'm trying to do away with.
Haven't found anything yet....still searching... :)
Hello,
You can try this method using the registry
navigate to HKEY_CLASSES_ROOT\Directory\Background\shellex\ContextMenuHandlers\New
and then blank out the default string value of {D969A300-E7FF-11d0-A93B-00A0C90F2719}

Before setting the default string to be blank you should export the New key for a backup.

Doing this should not affect right click a file and saying 'send to'

ASKER CERTIFIED SOLUTION
Avatar of oBdA
oBdA

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thanks, guys.  Monday's are usually hectic around here, so give me a couple of days to try out your suggestions on a test machine and see what works out best.
Yea I was looking at the "HKEY_CLASSES_ROOT\Directory\Background\shellex\ContextMenuHandlers\New" key myself... seemed right but wasn't sure which part to delete....
oBdA,
  I couldn't get your adm file to work (bummer, and I've never written a custom adm file so I have no idea what went wrong.  It created the Additional Settings\Windows Explorer folder but with nothing inside), but you pointed me in the right direction, got me enough info to come up with a working solution, and gave me a new idea (with the vbs script).  Thanks for the help.
Maybe I should have mentioned that more specifically: Since this is not a policy (as I actually mentioned), the policy editor MMC will not display it in the default setting. Highlight the "Administrative Templates" tree, then from the "View" menu uncheck the "Show policies only" (or similar); the editor will now show the "branding" settings in red (while the real policies are in blue).
Yes, you did say that about it not being an actual policy.  I didn't know about that filter.  Changing that made the settings show up under my gpo, and I suspect that little bit of information will prove useful in the future. Thanks.  Also, just to pass along to anyone who might be reading this in the future, I was able to combine both of the commands you provided above as NewLinkDeleteOnly and NewLinkScript into one as follows:  
%Comspec% /c del "%1" && wscript "\\%Logonserver%\netlogon\ShellNew.vbs"

I just asked a similar question here, wanted to give you first crack at it:
https://www.experts-exchange.com/questions/20946629/Remove-Prevent-Editing-of-Shortcut-Properties.html
No need to combine the two: The script will delete the short cut as well: fs.DeleteFile(Wscript.Arguments(0))
The difference is just that the "comspec" version doesn't require the script deployment; you only need one of the solutions, not both.