"Terry Pinnell" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> On this XP Pro (SP2) PC I cannot get any shortcut keys to work on the
> shortcuts made from any batch file.
>
> For example, Test-01.bat contains this
>
> @echo off
> pause
>
> I assigned it the shortcut <Ctl+Alt+3> (or any keys) as shown here
>
> http://dl.dropbox.com/u/4019461/BatchProblem.jpg
>
> But it doesn't run when I use the keys.
>
> It runs fine if I d-click either the original batch file or its shortcut.
>
> No difference after a reboot.
>
> I installed a little program called Shortcut Key Explorer v1 01 by RJL
> Software from http://www.rjlsoftware.com/software/.../shortcutkeys/
> which lists all the keyboard shortcuts in use. It found the couple I've
> successfully installed, such as a test with Calculator. But for the test
> batch file, even though it's shown as having ctl-alt-3 assigned in
> the Properties, the Shortcutkeys list doesn't include it.
>
> Very frustrating!
>
> Anyone have any ideas please?
>
> --
> Terry, East Grinstead, UK
Perhaps you need to invoke your batch file like so in the shortcut:
cmd /c "c:\Tools\MyBatchfile.bat
About the list of current shortcuts: Try the following.
1. Copy and paste the code below into c:\Windows\ShortcutKeys.vbs
2. Double-click it. It will scan each and every shortcut you have and report
if there is a shortcut key combination.
3. Report the result.
aKeys = Split("Ctrl+Shift,"",Alt+Shift,Alt+Ctrl", ",")
Set oWshShell = CreateObject("WScript.Shell")
Set oFSO = CreateObject("Scripting.FileSystemObject")
sList = "\Links.txt"
sProfiles = oWshShell.ExpandEnvironmentStrings("%UserProfile%\..")
sTemp = oWshShell.ExpandEnvironmentStrings("%Temp%")
oWshShell.Run "cmd.exe /u /c dir /s /a /b """ & sProfiles & "\*.lnk"" > """
_
& sTemp & sList & "", 0, True 'Use Unicode for non-ASCII file names
Set oList = oFSO.OpenTextFile(sTemp & sList, 1, False, -1) 'Read the names
in Unicode format
aLinks = Split(oList.ReadAll, VbCrLf)
oList.Close
oFSO.DeleteFile (sTemp & sList)
iCount = 0
For Each sName In (aLinks)
If sName <> "" Then
iCount = iCount + 1
sString = oFSO.OpenTextFile(sName).Read(70)
cKey = Mid(sString, 66, 1) 'The bytes are read in reverse order . . .
Letter = Mid(sString, 65, 1)
If cKey <> Chr(0) Then MsgBox aKeys(Asc(cKey)-3) & "+" & Letter & " " &
sName, vbOK, "Link file keyboard shortcuts"
End If
Next