Closed Tback1 closed 5 years ago
"C:\Program Files\Pyhon27\python.exe" C:/openwith/open_with_windows.py install
This should work (without the typo). I'm not sure why it doesn't.
If you replace the last line print('Open With native helper, version %s.' % VERSION)
with print(sys.argv)
and try again, what happens?
@darktrojan after instead of the print
the console show me this
C:\openwith>C:\openwith\open_with_windows.py install ['C:\\openwith\\open_with_windows.py']
@darktrojan the powershell give more debug information
` Windows PowerShell 版权所有 (C) 2009 Microsoft Corporation。保留所有权利。
PS C:\Users\Thresh> c:\openwith\open_with_windows.ps1 install\ PS C:\Users\Thresh> c:\openwith\open_with_windows.ps1 install Split-Path : 无法将参数绑定到参数“Path”,因为该参数是空值。 所在位置 C:\openwith\open_with_windows.ps1:22 字符: 28
Join-Path : 无法将参数绑定到参数“Path”,因为该参数是空值。 所在位置 C:\openwith\open_with_windows.ps1:23 字符: 24
New-Item : 无法将参数绑定到参数“Path”,因为该参数是空值。 所在位置 C:\openwith\open_with_windows.ps1:24 字符: 23
Get-Item : 无法绑定参数“ErrorAction”。由于枚举值无效,无法将值“Ignore”转换 为类型“System.Management.Automation.ActionPreference”。请指定以下枚举值之一, 然后重试。可能的枚举值为“SilentlyContinue、Stop、Continue、Inquire”。 所在位置 C:\openwith\open_with_windows.ps1:34 字符: 50
Join-Path : 无法将参数绑定到参数“Path”,因为该参数是空值。 所在位置 C:\openwith\open_with_windows.ps1:39 字符: 34
Get-Item : 无法绑定参数“ErrorAction”。由于枚举值无效,无法将值“Ignore”转换 为类型“System.Management.Automation.ActionPreference”。请指定以下枚举值之一, 然后重试。可能的枚举值为“SilentlyContinue、Stop、Continue、Inquire”。 所在位置 C:\openwith\open_with_windows.ps1:40 字符: 50
Set-Item : 值不能为空。 参数名: value 所在位置 C:\openwith\open_with_windows.ps1:44 字符: 12
无法将“ConvertTo-Json”项识别为 cmdlet、函数、脚本文件或可运行程序的名称。请检 查名称的拼写,如果包括路径,请确保路径正确,然后重试。 所在位置 C:\openwith\open_with_windows.ps1:51 字符: 87
Get-Item : 无法绑定参数“ErrorAction”。由于枚举值无效,无法将值“Ignore”转换 为类型“System.Management.Automation.ActionPreference”。请指定以下枚举值之一, 然后重试。可能的枚举值为“SilentlyContinue、Stop、Continue、Inquire”。 所在位置 C:\openwith\open_with_windows.ps1:34 字符: 50
Join-Path : 无法将参数绑定到参数“Path”,因为该参数是空值。 所在位置 C:\openwith\open_with_windows.ps1:39 字符: 34
Get-Item : 无法绑定参数“ErrorAction”。由于枚举值无效,无法将值“Ignore”转换 为类型“System.Management.Automation.ActionPreference”。请指定以下枚举值之一, 然后重试。可能的枚举值为“SilentlyContinue、Stop、Continue、Inquire”。 所在位置 C:\openwith\open_with_windows.ps1:40 字符: 50
Set-Item : 值不能为空。 参数名: value 所在位置 C:\openwith\open_with_windows.ps1:44 字符: 12
无法将“ConvertTo-Json”项识别为 cmdlet、函数、脚本文件或可运行程序的名称。请检 查名称的拼写,如果包括路径,请确保路径正确,然后重试。 所在位置 C:\openwith\open_with_windows.ps1:51 字符: 87
PS C:\Users\Thresh> `
After reading this thread I suspect it might have the answer you're looking for. You'll have to find the right place in the registry and add the %*
to get extra arguments sent to Python.
Great,it's work!!!
but it's under this reg
HKEY_CLASSES_ROOT\Applications\python.exe\shell\open\command
set the default item as
"C:\ProgramData\Anaconda3\python.exe" "%1" %*
I'm not sure if it helps, I've made a small launcher for windows that doesn't require Python. https://github.com/mbooga/owclauncher
After an update of firefox from 57 beta 5 to 58 beta1 the openwith is workless. so I try to rebuild the .bat and .json file I've tried the python 2.7.14 and python 3.6.both under Windows 7SP1 64bit but it just not to work and seems the function install didn't work, and I try to use the pycharm to debug it, it seems define the
version =7.3
than direct goto the bottom lineprint('Open With native helper, version %s.' % VERSION)
I checked the reg the HKEY_LOCAL_MACHINE\SOFTWARE\Clients\StartMenuInternet is well and the path of python is well. I don't know where the environment of system is not fine but the open_with_windows.py will not to make the bat and json
PS I've try to use the powershell file to skip the dependency of python.but it not work too.