Question

I got the following traceback in my setup script:

Exception in Tkinter callback
Traceback (most recent call last):
  File "Tkinter.pyc", line 1410, in __call__
  File "Setup.py", line 233, in step6
  File "Setup.py", line 203, in step7
  File "Setup.py", line 143, in step8
  File "Setup.py", line 76, in step9
  File "win32com\client\gencache.pyc", line 540, in EnsureDispatch
  File "win32com\client\CLSIDToClass.pyc", line 46, in GetClass
KeyError: '{4FBE7FE9-4AD1-4D70-BB77-66963016FD09}'

I've never seen this one before and have no idea what it means. Any ideas?

Edit:

I think it is coming from this bit of code:

fw = win32com.client.gencache.EnsureDispatch('HNetCfg.FwMgr', 0)
apps = fw.LocalPolicy.CurrentProfile.AuthorizedApplications
newapp = win32com.client.Dispatch('HNetCfg.FwAuthorizedApplication')
newapp.Name="Web Lock by ZBrown Technology"
newapp.ProcessImageFileName=d+"/ZBrownTechnology/Web Lock/Proxy.exe"
newapp.Enabled = True
apps.Add(newapp)
Was it helpful?

Solution

It means that COM could not instantiate the class with id {4FBE7FE9-4AD1-4D70-BB77-66963016FD09} (which probably is HNetCfg.FwMgr, the Windows Firewall scripting interface).

I think you have be be an administrator to do that, so that might only be a permission problem.

In you have administration privileges and it still doesn't work, maybe that class has been unregistered somehow. Try issuing the command:

regsvr32 %windir%\system32\hnetcfg.dll
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top