Changeset 1516

Show
Ignore:
Timestamp:
10/17/08 16:59:32 (3 months ago)
Author:
astormont
Message:

A few hacks to let wine-doors run msi uninstallers (The ones using classid)

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • wine-doors/trunk/src/application.py

    r1505 r1516  
    537537        self.Parse() 
    538538         
     539        allowed = [ "msiexec" ] 
     540 
    539541        reg = re.compile("^HK") 
    540542        if not self.app_pack['uninstall']: 
     
    544546        elif self.app_pack['uninstall'].lower().startswith("c:"): 
    545547            uninstaller = self.app_pack['uninstall'] 
     548        elif self.app_pack['uninstall'].lower().split(" ")[0] in allowed: 
     549            uninstaller = self.app_pack['uninstall'] 
    546550        else: 
    547551            uninstaller = self.pack_path + self.app_pack['uninstall'] 
     
    556560            args = None 
    557561             
    558         if os.path.isfile(uninstaller) or os.path.isfile( wine.ConvertPath(uninstaller) ): 
     562        if os.path.isfile(uninstaller) or \ 
     563           os.path.isfile( wine.ConvertPath(uninstaller) ) or \ 
     564           uninstaller.lower().split(" ")[0] in allowed : 
    559565            self.status = wine.Execute(uninstaller, args) 
    560566        else: 
  • wine-doors/trunk/src/wine.py

    r1505 r1516  
    274274        filefound = False 
    275275 
    276         if executable == "regedit" and not argstring: 
    277             return 
    278  
    279276        if not argstring: 
    280277            argstring = "" 
    281278        else: 
    282279            argstring = " "+argstring  
     280 
     281        # hard coded list of things to "just let through" 
     282        allowed = [ "regedit", "winver", "msiexec" ] 
    283283 
    284284        # fix file:// URI's 
     
    291291            oldcwd = os.getcwd() 
    292292            os.chdir( os.path.expanduser( "~/" ) ) 
    293          
     293 
    294294        # Various tests to locate the file, if we still fail return with an error 
    295         if not os.path.isfile(executable) and executable != "regedit" and executable != "winver"
     295        if not os.path.isfile(executable) and not executable.lower().split(" ")[0] in allowed
    296296            log.Warn("Can't find executable %s, Assuming CD drive path" % executable) 
    297297            cd = GetCDMountPoint() 
     
    309309 
    310310        # Determine the executable, and construct an executable command                 
    311         if executable == "regedit": 
    312             executable = "C:\\windows\\regedit.exe" 
    313         elif executable == "winver": 
     311        if executable == "winver": 
    314312            executable = "C:\\windows\\system32\\winver.exe" 
     313        elif executable.lower().split(" ")[0] in allowed: 
     314            run = executable 
    315315        elif re.search("\.msi", executable): 
    316316            run = "msiexec /i " + executable