Re: ~Name not defined" error
Alexandre Delattre <[email protected]> Fri, 11 Jul 2008 21:32:29 +0200
| Newsgroups | gmane.comp.python.windows-ce |
|---|---|
| Message-ID | <[email protected]> |
David Williams wrote: > I have replaced the lines as suggested and now get the error: > <Type 'exceptions.WindowsError'>:[Error 2] The system cannot find the > file specified > > I would be grateful for any further help. > Thank you > David williams > > 2008/7/11 <[email protected]>: > > ConnectRegistry seems not to be implemented in PythonCE > > However you can still replace: > > > aReg = ConnectRegistry(None,HKEY_LOCAL_MACHINE) > > aKey = OpenKey(aReg, r"SOFTWARE\Microsoft\Windows\CurrentVersion\Run") > > by: > > aKey = OpenKey(HKEY_LOCAL_MACHINE, > r"SOFTWARE\Microsoft\Windows\CurrentVersion\Run") > > > _______________________________________________ > PythonCE mailing list > [email protected] <mailto:[email protected]> > http://mail.python.org/mailman/listinfo/pythonce > > Hmm, you must make sure the key is existing in your device registry. Try to double check this and that the key isn't mispelled (btw, I use PHM Regeditor on my pda for this kind of stuff <http://www.phm.lu/Products/PocketPC/RegEdit/>) The use of raw string r"..." notation prevents you from having to escape \ characters, maybe give a try to: aKey = OpenKey(HKEY_LOCAL_MACHINE, r"Software\Microsoft\Windows\CurrentVersion\Run") Hope it helps, Alexandre