Link to home
Start Free TrialLog in
Avatar of Dolamite Jenkins
Dolamite JenkinsFlag for United States of America

asked on

WindowsError: [Error 2] The system cannot find the file specified

I keep getting this error
 Traceback (most recent call last):
File "C:/Documents and Settings/dolamite/Desktop/reg.py", line 4, in <module>
    aKey = OpenKey(aReg, r'SOFTWARE\SEMS_Event_Managment')
WindowsError: [Error 2] The system cannot find the file specified


from _winreg import *

aReg = ConnectRegistry(None,HKEY_LOCAL_MACHINE)
aKey = OpenKey(aReg, r'SOFTWARE\SEMS_Event_Managment')
expiration = QueryValueEx(aKey, "Expiration")
print expiration
CloseKey(aKey)

Open in new window


I am trying to get the expiration date from the registry

the exact location of the registry Im trying to locate is
My Computer\HKEY_LOCAL_MACHINE\SOFTWARE\SEMS_Event_Managment

Expiration

what am I doing wrong ?

 
ASKER CERTIFIED SOLUTION
Avatar of pepr
pepr

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Dolamite Jenkins

ASKER

thank I will try this...
perfect thanks