summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLuke Macken <lmacken@redhat.com>2011-01-05 19:56:21 -0500
committerLuke Macken <lmacken@redhat.com>2011-01-05 19:56:21 -0500
commitb7e0e5b6ab72548d1d1080cb94c2e6e8e3f92683 (patch)
treed8b5e88d188794d3c71a6e19fa2917ce7f878e9f
parent0e73c3201f82a34ac00927df10f97e5fe8c02ee5 (diff)
Look for our tools in the windows PROGRAMFILES.3.9.3
Ideally, we should grab this location from the registry...
-rwxr-xr-xliveusb/creator.py11
1 files changed, 9 insertions, 2 deletions
diff --git a/liveusb/creator.py b/liveusb/creator.py
index ae63f84..257ccd1 100755
--- a/liveusb/creator.py
+++ b/liveusb/creator.py
@@ -1017,8 +1017,15 @@ class WindowsLiveUSBCreator(LiveUSBCreator):
import win32process
if isinstance(cmd, basestring):
cmd = cmd.split()
- tool = os.path.join('.', 'tools', '%s.exe' % cmd[0])
- if not os.path.exists(tool):
+ prgmfiles = os.getenv('PROGRAMFILES')
+ paths = (prgmfiles, prgmfiles + ' (x86)', '.')
+ tool = None
+ for path in paths:
+ exe = os.path.join(path, 'LiveUSB Creator', 'tools', '%s.exe' % cmd[0])
+ if os.path.exists(exe):
+ tool = '"%s"' % exe
+ break
+ else:
raise LiveUSBError(_("Cannot find") + ' %s. ' % (cmd[0]) +
_("Make sure to extract the entire "
"liveusb-creator zip file before "