Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Environment variables in link arguments not expanded on Windows 10 #149

Closed
kenniskoldewyn opened this issue Jan 16, 2017 · 4 comments
Closed

Comments

@kenniskoldewyn
Copy link

@kenniskoldewyn kenniskoldewyn commented Jan 16, 2017

Keypirinha (version 2.9.10 (b68b8b4) for x64) properly expands environment variables in link targets on Windows 10. For example, any link that points to %windir%\System32\mmc.exe will run C:\Windows\System32\mmc.exe if the windir environment variable is set to C:\Windows. However, this expansion is not carried out as it should be for arguments to targets. For example, the target for the link to the Hyper-V Manager administrative tool includes a command-line argument: %windir%\System32\mmc.exe "%windir%\System32\virtmgmt.msc". Note that both the target and the argument being passed to it contain the environment variable windir. When using Keypirinha to open this item, mmc.exe runs and gives the error message MMC cannot open the file %windir%\System32\virtmgmt.msc, but when opening the same item from the Windows Start menu, mmc.exe runs and opens the Hyper-V Manager console as expected.

@polyvertex
Copy link
Member

@polyvertex polyvertex commented Jan 16, 2017

Nice catch, thanks for your feedback!

@polyvertex
Copy link
Member

@polyvertex polyvertex commented Jan 16, 2017

Corrected and will be fixed in next release, sorry for the inconvenience

@polyvertex
Copy link
Member

@polyvertex polyvertex commented Jan 16, 2017

I might not roll a release for a little while so in the meantime, here is a fix you can apply by yourself:

  1. Exit Keypirinha
  2. Download keypirinha_util.zip
  3. Extract keypirinha_util.py from the archive and copy it to keypirinha\python\site\keypirinha_util.py (overwrite)
  4. Start Keypirinha
@polyvertex
Copy link
Member

@polyvertex polyvertex commented Jan 26, 2017

Fixed in v2.10

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.