def DumpRemoteFolders(): # Dump all special folders possible. for name, val in list(wincerapi.__dict__.items()): if name[:6] == "CSIDL_": try: loc = str(wincerapi.CeGetSpecialFolderPath(val)) print("Folder %s is at %s" % (name, loc)) except win32api.error as details: pass # Get the shortcut targets for the "Start Menu" print("Dumping start menu shortcuts...") try: startMenu = str( wincerapi.CeGetSpecialFolderPath(wincerapi.CSIDL_STARTMENU)) except win32api.error as details: print("This device has no start menu!", details) startMenu = None if startMenu: for fileAttr in wincerapi.CeFindFiles(os.path.join(startMenu, "*")): fileName = fileAttr[8] fullPath = os.path.join(startMenu, str(fileName)) try: resolved = wincerapi.CeSHGetShortcutTarget(fullPath) except win32api.error as xxx_todo_changeme: (rc, fn, msg) = xxx_todo_changeme.args resolved = "#Error - %s" % msg print("%s->%s" % (fileName, resolved))
def DumpRemoteFolders(): # Dump all special folders possible. for name, val in wincerapi.__dict__.items(): if name[:6] == "CSIDL_": try: loc = str(wincerapi.CeGetSpecialFolderPath(val)) print "Folder %s is at %s" % (name, loc) except win32api.error, details: pass
def DumpRemoteFolders(): # Dump all special folders possible. for name, val in wincerapi.__dict__.items(): if name[:6] == "CSIDL_": try: loc = str(wincerapi.CeGetSpecialFolderPath(val)) print "Folder %s is at %s" % (name, loc) except win32api.error, details: pass # Get the shortcut targets for the "Start Menu" print "Dumping start menu shortcuts..." try: startMenu = str( wincerapi.CeGetSpecialFolderPath(wincerapi.CSIDL_STARTMENU)) except win32api.error, details: print "This device has no start menu!", details startMenu = None if startMenu: for fileAttr in wincerapi.CeFindFiles(os.path.join(startMenu, "*")): fileName = fileAttr[8] fullPath = os.path.join(startMenu, str(fileName)) try: resolved = wincerapi.CeSHGetShortcutTarget(fullPath) except win32api.error, (rc, fn, msg): resolved = "#Error - %s" % msg print "%s->%s" % (fileName, resolved) # print "The start menu is at",