New
#40
Try the following:
Code:(REG ADD "HKCR\.rtf\ShellNew" /V "IconPath" /T REG_SZ /D "C:\Users\Phil\Documents\Icons\WORDPAD.EXE, 1.ico" /F)
I have used the above method in my script: How to Add Create Elevated Shortcut to New Context Menu in Windows 10
Thank you for your suggestion. For some reason, I didn't see this post before...must have gotten distracted. However, I don't know how to use that line of code.
Is it a line I put in the registry? A bat file? Or something else?
Edited: Sorry. I read your link, so I made your code into a bat file & ran it as administrator. It did add the key to the registry. However, even after a reboot, the icon didn't change. Any other ideas?
Thank you again.
Last edited by phrab; 20 Oct 2020 at 11:03.
@phrab, are you referring to the icon shown on the context menu like the one below?
I ran the following command:
(REG ADD "HKCR\.rtf\ShellNew" /V "IconPath" /T REG_SZ /D "D:\Power-button.ico" /F)
Now, the icon for Rich Text Document has become a red power button as shown above. No reboot is needed.
When I runReg QUERY "HKCR\.rtf\ShellNew"
, I will get the following output:
Code:HKEY_CLASSES_ROOT\.rtf\ShellNew Data REG_SZ {\rtf1} ItemName REG_EXPAND_SZ @%ProgramFiles%\Windows NT\Accessories\WORDPAD.EXE,-213 IconPath REG_SZ D:\Power-button.ico
When I runReg QUERY "HKEY_CLASSES_ROOT\rtffile\DefaultIcon"
, I will get the following output:
Code:HKEY_CLASSES_ROOT\rtffile\DefaultIcon (Default) REG_EXPAND_SZ "%ProgramFiles%\Windows NT\Accessories\WORDPAD.EXE",1
Hi Matthew:
No, I was referring to the icon of an .rtf file. But the icon on both my .rtf files & the one on the context menu are the same:
This is what Icurrently have for a file:
This is what I currently have for a context menu:
In each case, the icon is the same. I can't seem to change it to this:
It is impossible for me to change the default RTF file icon:
I ran the following line of command via Windows PowerShell (Admin). The icon path has been changed successfully, but the displayed icon remains unchanged. The icon does not depend on "HKCR\rtffile\DefaultIcon".
(REG ADD "HKCR\rtffile\DefaultIcon" /T REG_EXPAND_SZ /D "D:\Power-button.ico" /F)
It applies only to the jump list but not to File Explorer.
I tried the "Restore all default items" registry thing but i now have two shortcut items in the new section, It also removed the folder entry. Is there any way of fixing this?
Edit: Never mind, I fixed it by downloading the "Restore New Folder entry" registry file, i'm so stupid.
@Matthew Wai
I cannot get contacts to appear on the new context menu. The correct registry entries are present in HKCR\.contact\ShellNew Keys.
I used the command you suggested, (REG ADD "HKCR\Data" /T REG_SZ /D "Contact" /F) and merged the registry file presenta at the beginning of the tutorial. No luck.
I can get other file extensions to add, just not contact. Do I include the parenthses between the command?
I run Win10 x64 21H1 with Office 365 if that makes a difference. Does Windows block this entry for some reason? Any suggestions to enable contacts again?
Thanks!
(1) Run the following command to back up the current ".contact" key:
Reg export "HKCR\.contact" "%USERPROFILE%\Desktop\[.contact].reg"
If you have relocated your desktop, change the \Desktop\ folder accordingly.
(2) Run the following command to add a new key:
(REG Add "HKCR\bamajon1974" /T REG_SZ /D "Contact" /F)
(3) Run the following command to set bamajon1974 as the default value data:
(REG Add "HKCR\.contact" /T REG_SZ /D "bamajon1974" /F)
(4) The item "Contact" will appear on the "New" context menu: