Create new file (ShellNew)
Posted: Sun Jul 16, 2023 12:12 pm
I wanted to create a new file according to the template, but I did not succeed right away.
I added the file "C:\Windows\ShellNew\PureBasic.pb" and the ShellNew key in the registry. At the same time, I did not have an item in the explorer menu. I added PureBasic to the PureBasic.exe section following the example of other associations:
Now I had a PureBasic item, but it was the same for the "pb" and "pbi" extensions. I tried to specify an explicit name in the ItemName and MenuText parameters, but it didn't work. So I created the DLL file with ResourceHacker using the menu item "Action -> "Add using Script Template" -> STRING_TBL. Further, following the example of the ".txt" registry key, I made a link to the resource.
FileName - the name of the file in the folder "C:\Windows\ShellNew\"
IconPath - the icon displayed in the explorer menu
MenuText - the item displayed in the explorer menu
ItemName - the name of the file created in Explorer
I added the file "C:\Windows\ShellNew\PureBasic.pb" and the ShellNew key in the registry. At the same time, I did not have an item in the explorer menu. I added PureBasic to the PureBasic.exe section following the example of other associations:
Code: Select all
[HKEY_CLASSES_ROOT\PureBasic.exe]
@="PureBasic"
Code: Select all
[HKEY_CLASSES_ROOT\.pb\ShellNew]
"FileName"="PureBasic.pb"
"IconPath"="C:\\Program Files\\PureBasic\\PureBasic 6.02 x64\\PureBasic.exe,1"
"MenuText"="@C:\\path\\text.dll,-1"
"ItemName"="@C:\\path\\text.dll,-1"
IconPath - the icon displayed in the explorer menu
MenuText - the item displayed in the explorer menu
ItemName - the name of the file created in Explorer