This is weird. I managed to open a program with the complete path (still have to quote it) but not to open a program in the current working dir. Anyway, I found that if you specify a non existent working directory you will not be able to start any program, neither one in system path (I tried with cmd.exe); so the problem should be not within setWorkingDirectory().
I hope hat someone with more knowledge about PyQt could help.
p.start("\"C:\\Program Files\\Internet Explorer\\iexplore.exe\"")
# This works.
...
p.setWorkingDirectory("C:\\Program Files\\Internet Explorer")
p.start("cmd.exe")
# This works.
...
p.setWorkingDirectory("C:\\I do not exist")
p.start("cmd.exe")
# This DOES NOT works.
...
p.setWorkingDirectory("C:\\Program Files\\Internet Explorer")
p.start("iexplorer.exe")
# This DOES NOT works.
p = QtCore.QProcess()
p.start("\"C:\\Program Files\\Internet Explorer\\iexplore.exe\"")
# This works.
...
p = QtCore.QProcess()
p.setWorkingDirectory("C:\\Program Files\\Internet Explorer")
p.start("cmd.exe")
# This works.
...
p = QtCore.QProcess()
p.setWorkingDirectory("C:\\I do not exist")
p.start("cmd.exe")
# This DOES NOT works.
...
p = QtCore.QProcess()
p.setWorkingDirectory("C:\\Program Files\\Internet Explorer")
p.start("iexplorer.exe")
# This DOES NOT works.
To copy to clipboard, switch view to plain text mode
Bookmarks