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

asked on

registration checker

Itrying to  have my registration checker will be looking in registry :
My Computer\HKEY_LOCAL_MACHINE\SOFTWARE\SEMS\
for key:
Expiration
value in format:
MM/DD/YYYY
(month/day can be 1 or 2 characters in length, year will always be 4)

then warns you if you are <60 days from expiration and has a different message for last day usable.

If not online, use computer clock - if online get online time and update "last time online" to current date. (also in format MM/DD/YYYY)

This is the code I am trying to modify

aReg = ConnectRegistry(None,HKEY_LOCAL_MACHINE\SOFTWARE\SEMS\)
I keep getting a syntax error

Open in new window

from _winreg import *

print r"*** Reading from SOFTWARE\Microsoft\Windows\CurrentVersion\Run ***"
aReg = ConnectRegistry(None,HKEY_LOCAL_MACHINE)

aKey = OpenKey(aReg, r"SOFTWARE\Microsoft\Windows\CurrentVersion\Run") 
for i in range(1024):                                           
    try:
        n,v,t = EnumValue(aKey,i)
        print i, n, v, t
    except EnvironmentError:                                               
        print "You have",i," tasks starting at logon..."
        break          
CloseKey(aKey) 

Open in new window

                                               
ASKER CERTIFIED SOLUTION
Avatar of clockwatcher
clockwatcher

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

thanks
Thanks