This commit is contained in:
Bram Veenboer
2011-02-27 12:05:38 +00:00
parent 0473a81229
commit 363356b564
8 changed files with 92 additions and 6 deletions

View File

@@ -37,9 +37,12 @@ abstract public class WindowsApplication extends Application {
if (handle < 1) {
String key = String.format("%s\\%s", REGISTRY, program);
String path = Native.getValue(key);
System.out.println("PATH=" + path);
try {
String command = String.format("\"%s\"", path);
String command = path.startsWith("\"") ? path : String.format("\"%s\"", path);
System.out.println("COMMAND=" + command);
command = Native.replaceVariables(command);
System.out.println("COMMAND=" + command);
process = Runtime.getRuntime().exec(command);
sleep(START_SLEEP);
handle = Windows.findWindow(name, null);

View File

@@ -30,7 +30,7 @@ public class WMPApplication extends WindowsApplication {
command(18813);
break;
case REWIND:
command(18814);
command(18812);
break;
case MUTE:
command(18817);