protected desktop shortcut

J

Jassim Rahma

is there any way to create a protected windows desktop shortcut which can't
be deleted just like the recycle bin icon?
 
J

Jassim Rahma

setting it to read-only will only prompt the user to confirm but it will
allow him to delete.

I want to have an icon just like the recycle bin with no delete option.
 
J

ju.c

How to create a folder or shortcut on the 'Desktop' or 'My Computer'
that cannot be renamed or deleted, like the 'Recycle Bin'.


CREATE THEN EDIT THIS REGISTRY FILE:

- You can download this file and "GUIDGen.EXE" from here:
- Desktop_Shortcut_No_Delete.zip 400 kb
- http://www.mediafire.com/download.php?rhnmnnjwjm2

1. Copy below and paste into Notepad:

----------copy inside only----------
Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\CLSID\{unique guid}]
@="{folder or shortcut name}"

[HKEY_CLASSES_ROOT\CLSID\{unique guid}\DefaultIcon]
@="{path to .ico file}"

[HKEY_CLASSES_ROOT\CLSID\{unique guid}\InprocServer32]
@=hex(2):25,00,57,00,69,00,6e,00,44,00,69,00,72,00,25,00,5c,00,73,\
00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,73,00,68,00,65,00,6c,00,\
6c,00,33,00,32,00,2e,00,64,00,6c,00,6c,00,00,00
"ThreadingModel"="Apartment"

[HKEY_CLASSES_ROOT\CLSID\{unique guid}\shell]

[HKEY_CLASSES_ROOT\CLSID\{unique guid}\shell\open]

[HKEY_CLASSES_ROOT\CLSID\{unique guid}\shell\open\command]
@=hex(2):25,00,57,00,69,00,6e,00,44,00,69,00,72,00,25,00,5c,00,65,\
00,78,00,70,00,6c,00,6f,00,72,00,65,00,72,00,2e,00,65,00,78,00,65,00,20,00,\
2f,00,65,00,2c,00,43,00,3a,00,5c,00,50,00,61,00,74,00,68,00,00,00

[HKEY_CLASSES_ROOT\CLSID\{unique guid}\shellex]

[HKEY_CLASSES_ROOT\CLSID\{unique guid}\shellex\PropertySheetHandlers]

[HKEY_CLASSES_ROOT\CLSID\{unique guid}\shellex\PropertySheetHandlers\{unique guid}]

[HKEY_CLASSES_ROOT\CLSID\{unique guid}\ShellFolder]
"Attributes"=hex:00,00,00,00

; To place it on the Desktop remove the ";":
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Desktop\NameSpace\{unique guid}]

; To put it in My Computer remove the ";":
;[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{unique guid}]

----------copy inside only----------

2. You'll need to create a {unique guid}, so download the Microsoft
GUID (Globally Unique Identifier) generating utility first:
GUIDGen.EXE 434 kb (Freeware)
Download: http://www.microsoft.com/downloads/...58-484f-4a8c-bb39-adb270833afc&displaylang=en

Here's another GUID generator (non-Microsoft):
GUIDGenerator 1.01 250 kb (Freeware)
Info: http://www.max2k.com/programs.php?id=30
Download: http://www.max2k.com/programs/GUIDGenerator.zip
Installer: http://www.max2k.com/programs/GUIDGenerator.exe

3. Run GUIDGEN.EXE, select "4. Registry Format", click the "New GUID"
button then click the "Copy" button.

3. In Notepad, 'Search and Replace' all "{unique guid}" with the GUID
you just got from GUIDGEN.EXE.

4. Add or remove the ";" from the last two lines depending on your preference.

5. Save-as Custom.reg (or any name + .reg)

6. Double-click or right-click and merge into the registry.

7. All you have to do now is enter the path for the icon file and
the path for the shortcut (folder or file). This is best done
using the Registry Editor because of syntax issues.

Open this key and enter the icon file's path:
- If using an EXE or DLL end with ,0. Example: file.exe,0
- Do not include quotes
[HKEY_CLASSES_ROOT\CLSID\{unique guid}\DefaultIcon]

Open this key and enter the path to the folder or file:
- Just replace "C:\Path" from: %WinDir%\explorer.exe /e,C:\Path
- Add quotes if there are spaces. Example:
%WinDir%\explorer.exe /e,"C:\Program Files\Path To\Folder\"
- For files, replace the whole line: %WinDir%\explorer.exe /e,C:\Path
with the path to an exe file. Example: "C:\Program Files\GUIDGen\GUIDGen.exe"
For documents you'll need to add the path to the program that
will open the document. Example:
%WinDir%\notepad.exe "C:\Documents and Settings\{username}\My Documents\text.txt"
[HKEY_CLASSES_ROOT\CLSID\{unique guid}\shell\open\command]


TO REMOVE THE SHORTCUT, CREATE THIS REG FILE THEN MERGE IT:

1. Copy below and paste into Notepad.

----------copy inside only----------
Windows Registry Editor Version 5.00

[-HKEY_CLASSES_ROOT\CLSID\{unique guid}]
[-HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Desktop\NameSpace\{unique guid}]
[-HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{unique guid}]

----------copy inside only----------

2. In Notepad, 'Search and Replace' all "{unique guid}" with the GUID.

3. Save-as Custom_Remove.reg (or any name + .reg)

4. Double-click or right-click and merge into the registry.


ju.c
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top