No. Some boxes are simply hardcoded not to use accelerator keys, so tab is your only way to go(without use of 3rd party).
Example, manipulating with Run box, can do anything with it, but cant underline OK or Cancel;
$cpuUsage = Get-WmiObject Win32_Processor | Select-Object -ExpandProperty LoadPercentage
$memory = Get-WmiObject Win32_OperatingSystem
$totalMemory = [math]::Round($memory.TotalVisibleMemorySize / 1MB, 2)
$freeMemory = [math]::Round($memory.FreePhysicalMemory / 1MB, 2)
$usedMemory = $totalMemory - $freeMemory
$systemInfo = "Current CPU Usage: $cpuUsage%`n"
$systemInfo += "RAM usage: $usedMemory/$totalMemory MB`n"
$dialogTitle = "Example of Run box on $($env:COMPUTERNAME)."
Add-Type @"
using System;
using System.Runtime.InteropServices;
public class Win32 {
[DllImport("shell32.dll", EntryPoint = "#61", CharSet = CharSet.Unicode)]
public static extern int RunFileDlg(
IntPtr hWnd,
IntPtr icon,
string path,
string title,
string prompt,
uint flags);
}
"@
$RFF_NOBROWSE = 1
$RFF_NODEFAULT = 2
$RFF_CALCDIRECTORY = 4
$RFF_NOLABEL = 8
$RFF_NOSEPARATEMEM = 14
$RFF_OK = 0x00008000
[Win32]::RunFileDlg([IntPtr]::Zero, [IntPtr]::Zero, $null, $dialogTitle, $systemInfo, $RFF_OK)
Save as Somename.ps1 and run. Notice how it even underlines Open(even by default as much as i tested it) when Alt is pressed, but doesnt do anything.