![]() ![]() To check if there are multiple lines, if there is only one line use: $Python=where.exe Python.exe The first line uses where.exe to find where the Python.exe is, if Python.exe is in PATH environment variable, problem is if there are multiple Python.exe the result of it isn't a one line string, there would be multiple lines, try to run: where.exe Python.exe Set-ItemProperty -Path "HKCR:\Python.File\shell\runas\command" -Name "DelegateExecute" -Type String -Value '""' Set-ItemProperty -Path "HKCR:\Python.File\shell\runas\command" -Name "(Default)" -Type String -Value $Command ![]() Step 2: Paste these commands: $python=where.exe Python.exeĬmd /c $('ftype Python.File="" \"%1\" %*' -f $python.replace("\","\\") Win+ R→type powershell→ Ctrl+ Shift+ Enter You can modify the registry to add Run as Administrator option for Python files to context menu. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |