def get_sdk_dir(self):
if not WINREG:<EOL><INDENT>return '<STR_LIT>'<EOL><DEDENT>path = r'<STR_LIT>'<EOL>for node in ['<STR_LIT>', r'<STR_LIT>']:<EOL><INDENT>for hkey in [HKEY_LOCAL_MACHINE, HKEY_CURRENT_USER]:<EOL><INDENT>sub_key = node + path + '<STR_LIT:\\>' + self.sdk_version<EOL>try:<EOL><INDENT>key = OpenKey(hkey, sub_key)<EOL><DEDENT>except OSError:<EOL><INDENT>logging.debug(_('<STR_LIT>'), sub_key)<EOL>continue<EOL><DEDENT>else:<EOL><INDENT>logging.info(_('<STR_LIT>'), sub_key)<EOL>value_name = '<STR_LIT>'<EOL>try:<EOL><INDENT>value = QueryValueEx(key, value_name)<EOL><DEDENT>except OSError:<EOL><INDENT>return '<STR_LIT>'<EOL><DEDENT>logging.info(_('<STR_LIT>'), value[<NUM_LIT:0>])<EOL>return value[<NUM_LIT:0>]<EOL><DEDENT><DEDENT><DEDENT>return '<STR_LIT>'<EOL>
Get the directory of Windows SDK from registry.