Building on @user364455's answer, this modifies both the >Edit and >Open context menu items, allowing you to open .ps1 files (with commas in the path) in ISE with elevation by either double-clicking on a .ps1 file or right-clicking in Explorer and choosing 'Edit'. A here-string was used to save the headache of escaping quotes. A PowerShell console window unfortunately pops up for a split second, which there are workarounds for (the most common one I've found involves VBScript).
PowerShell:
$newValue = @'
PowerShell.exe -NoProfile -WindowStyle Hidden -NonInteractive -Command "& {Start-Process -FilePath C:\Windows\System32\WindowsPowerShell\v1.0\powershell_ise.exe -ArgumentList '""""""""%1""""""""' -Verb RunAs}"
'@
# Open
Set-ItemProperty -Path HKLM:\SOFTWARE\Classes\Microsoft.PowerShellScript.1\Shell\Open\Command -Name '(default)' -Value $newValue -Force
# Edit
Set-ItemProperty -Path HKLM:\SOFTWARE\Classes\SystemFileAssociations\.ps1\Shell\Edit\Command -Name '(default)' -Value $newValue -Force
.reg version
Windows Registry Editor Version 5.00
; Open
[HKEY_CLASSES_ROOT\Microsoft.PowerShellScript.1\Shell\Open\Command]
@="PowerShell.exe -NoProfile -WindowStyle Hidden -NonInteractive -Command \"& {Start-Process -FilePath C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell_ise.exe -ArgumentList '\"\"\"\"\"\"\"\"%1\"\"\"\"\"\"\"\"' -Verb RunAs}\""
; Edit
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\SystemFileAssociations\.ps1\Shell\Edit\Command]
@="PowerShell.exe -NoProfile -WindowStyle Hidden -NonInteractive -Command \"& {Start-Process -FilePath C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell_ise.exe -ArgumentList '\"\"\"\"\"\"\"\"%1\"\"\"\"\"\"\"\"' -Verb RunAs}\""
open with > notepad
seems to work, though. But yeah, Windows is definitely not handling commas correctly.