Comments (9)
Hi @regul4rj0hn
Could you pull the latest version, and try to install it again.
I find that windows may cache the context menu.
If you found that the icon still empty, you may try to re-login again.
Thanks!
from windows-terminal-context-menu.
Hi @Nomelas
I do some modify of the registry scope.
Now it only modify the HKEY_CURRENT_USER scope entry, so no longer need to run as admin.
You can try it again 😊
I don't really understand about the context menu does not show up in subdirectories under windows libraries. Could you give me a screenshot?
Thank you for your PRs , I found some style mismatch my original one.
I would give some review for that.
from windows-terminal-context-menu.
I found the reason, it lives under a different location in the registry... The new pr addresses it but returns the scope to requiring admin :/
from windows-terminal-context-menu.
New version of Windows terminal would have a different default profiles.json.
Could you backup your origin profiles.json, then open windows terminal again.
This will generate a new one.
from windows-terminal-context-menu.
Yep, that was it, the icons are cached, logout and back in fixes that bit. That said, it's not being bind correctly:
The other problem with the profiles still stands too. If I Write-Host "Raw content: $rawContent"
I get all the profiles.json file, but after running ConvertFrom-Json, the $profiles variable is empty. I'll troubleshoot some more later and let you know.
Thanks for the help!
from windows-terminal-context-menu.
Could you help me check if the following appear in your profiles.json.
"icon" : "ms-appx:///ProfileIcons/{0caa0dad-35be-5f56-a8ff-afceeeaa6101}.png"
I think there may be something wrong about the RegExp used to remove json comment.
After Powershell 6, it can handle JSON with comment out of box.
But most of users may not use such new version. I want to offer more capabilities.
I have tried to fix it on latest commit.
Hope this will resolve your problem.
from windows-terminal-context-menu.
submitted PR again (after manually merging new changes)
This must be set (As Admin):
Set-ExecutionPolicy Unrestricted
But everything else now works, seemingly without admin
EDIT: Could be the differnce in windows/ps versions as well, idk
from windows-terminal-context-menu.
Actually found 1 issue:
the context menu does not show up in subdirectories under windows libraries - but if I nav to the same dir ouside of the Libraries shortcuts, it works... strange
This is my first time messing around with powershell :/
from windows-terminal-context-menu.
Could you help me check if the following appear in your profiles.json
Certainly, here's a chunk of my profiles:
Looks like the icon property is in a couple different formats.
Running as admin, getting a bunch of errors related to the changes. Here:
PS D:\Projects\Windows-terminal-context-menu> .\SetupContextMenu.ps1
Copy icons => C:\Users\mauro\AppData\Local\WindowsTerminalContextIcons\
New-Item : The registry key at the specified path does not exist.
At D:\Projects\Windows-terminal-context-menu\SetupContextMenu.ps1:55 char:8
+ [void](New-Item -Path $contextMenuRegPath)
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidArgument: (HKEY_CURRENT_US...Directory\shell:String) [New-Item], ArgumentExceptio
n
+ FullyQualifiedErrorId : System.ArgumentException,Microsoft.PowerShell.Commands.NewItemCommand
New-ItemProperty : Cannot find path 'HKEY_CURRENT_USER\SOFTWARE\Classes\Directory\shell\WindowsTerminal' because it
does not exist.
At D:\Projects\Windows-terminal-context-menu\SetupContextMenu.ps1:56 char:8
+ [void](New-ItemProperty -Path $contextMenuRegPath -Name ExtendedSubCo ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (HKEY_CURRENT_US...WindowsTerminal:String) [New-ItemProperty], ItemNotFo
undException
+ FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.NewItemPropertyCommand
New-ItemProperty : Cannot find path 'HKEY_CURRENT_USER\SOFTWARE\Classes\Directory\shell\WindowsTerminal' because it
does not exist.
At D:\Projects\Windows-terminal-context-menu\SetupContextMenu.ps1:57 char:8
+ [void](New-ItemProperty -Path $contextMenuRegPath -Name Icon -Propert ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (HKEY_CURRENT_US...WindowsTerminal:String) [New-ItemProperty], ItemNotFo
undException
+ FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.NewItemPropertyCommand
New-ItemProperty : Cannot find path 'HKEY_CURRENT_USER\SOFTWARE\Classes\Directory\shell\WindowsTerminal' because it
does not exist.
At D:\Projects\Windows-terminal-context-menu\SetupContextMenu.ps1:58 char:8
+ [void](New-ItemProperty -Path $contextMenuRegPath -Name MUIVerb -Prop ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (HKEY_CURRENT_US...WindowsTerminal:String) [New-ItemProperty], ItemNotFo
undException
+ FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.NewItemPropertyCommand
Add top layer menu (shell) => Registry::HKEY_CURRENT_USER\SOFTWARE\Classes\Directory\shell\WindowsTerminal
New-Item : The registry key at the specified path does not exist.
At D:\Projects\Windows-terminal-context-menu\SetupContextMenu.ps1:61 char:8
+ [void](New-Item -Path $contextBGMenuRegPath)
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidArgument: (HKEY_CURRENT_US...ackground\shell:String) [New-Item], ArgumentExceptio
n
+ FullyQualifiedErrorId : System.ArgumentException,Microsoft.PowerShell.Commands.NewItemCommand
New-ItemProperty : Cannot find path 'HKEY_CURRENT_USER\SOFTWARE\Classes\Directory\Background\shell\WindowsTerminal'
because it does not exist.
At D:\Projects\Windows-terminal-context-menu\SetupContextMenu.ps1:62 char:8
+ [void](New-ItemProperty -Path $contextBGMenuRegPath -Name ExtendedSub ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (HKEY_CURRENT_US...WindowsTerminal:String) [New-ItemProperty], ItemNotFo
undException
+ FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.NewItemPropertyCommand
New-ItemProperty : Cannot find path 'HKEY_CURRENT_USER\SOFTWARE\Classes\Directory\Background\shell\WindowsTerminal'
because it does not exist.
At D:\Projects\Windows-terminal-context-menu\SetupContextMenu.ps1:63 char:8
+ [void](New-ItemProperty -Path $contextBGMenuRegPath -Name Icon -Prope ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (HKEY_CURRENT_US...WindowsTerminal:String) [New-ItemProperty], ItemNotFo
undException
+ FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.NewItemPropertyCommand
New-ItemProperty : Cannot find path 'HKEY_CURRENT_USER\SOFTWARE\Classes\Directory\Background\shell\WindowsTerminal'
because it does not exist.
At D:\Projects\Windows-terminal-context-menu\SetupContextMenu.ps1:64 char:8
+ [void](New-ItemProperty -Path $contextBGMenuRegPath -Name MUIVerb -Pr ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (HKEY_CURRENT_US...WindowsTerminal:String) [New-ItemProperty], ItemNotFo
undException
+ FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.NewItemPropertyCommand
Add top layer menu (background) => Registry::HKEY_CURRENT_USER\SOFTWARE\Classes\Directory\shell\WindowsTerminal
Add new entry => Registry::HKEY_CURRENT_USER\SOFTWARE\Classes\Directory\ContextMenus\WindowsTerminal\shell\
Add new entry => Registry::HKEY_CURRENT_USER\SOFTWARE\Classes\Directory\ContextMenus\WindowsTerminal\shell\
Add new entry => Registry::HKEY_CURRENT_USER\SOFTWARE\Classes\Directory\ContextMenus\WindowsTerminal\shell\
Add new entry => Registry::HKEY_CURRENT_USER\SOFTWARE\Classes\Directory\ContextMenus\WindowsTerminal\shell\
Add new entry => Registry::HKEY_CURRENT_USER\SOFTWARE\Classes\Directory\ContextMenus\WindowsTerminal\shell\
from windows-terminal-context-menu.
Related Issues (20)
- Add "Run as Admin" Items HOT 9
- Add Context Menu to Drives HOT 1
- Open as Tab on a existing Terminal window HOT 4
- Does not work if username has a space in between HOT 1
- i'm sorry, please delete this
- Adding Git Bash does not work HOT 2
- Option to show the menu on Shift-RightClick HOT 2
- Directory Paths not working for Cygwin HOT 7
- Admin Terminal Option HOT 1
- Add keyboard shortcut
- Error while installing firebase packages into flutter project HOT 1
- File doesn't have app associated with it HOT 4
- Icons in windows terminal dont show up unless launched as admin HOT 1
- Need to add bash support HOT 1
- No submenu
- Not working with Windows Terminal Preview HOT 2
- Could not find path
- Git Bash default icon on context menu is replaced by unknown.ico HOT 1
- Run-As window flashes during execution
- Does not work for custom added terminals HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from windows-terminal-context-menu.