[python-win32] path to START MENU folder

2005-09-09 Thread Chavez Gutierrez, Freddy
Title: path to START MENU folder





Somewhere I found this code to get the path to the DESKTOP folder:


 from win32com.shell import shell
 df = shell.SHGetDesktopFolder()
 pidl = df.ParseDisplayName(0, None,::{450d8fba-ad25-11d0-98a8-0800361b1103})[1]
 mydocs = shell.SHGetPathFromIDList(pidl)
 print mydocs


When I execute it, I get this: C:\Documents and Settings\freddy\My Documents.


That's ok. Now, I want to get the START MENU folder for all users, which is something like: C:\Documents and Settings\All Users\Start Menu.

Thanks for your help.


Regards,
Freddy Chavez.



___
Python-win32 mailing list
Python-win32@python.org
http://mail.python.org/mailman/listinfo/python-win32


[python-win32] path to START MENU folder

2005-09-09 Thread Peter Jessop
Hola Freddy

Another way of doing it would be to use the WScript.Shell object:

import win32com.client
objShell = win32com.client.Dispatch(WScript.Shell)
allUserDocs = objShell.SpecialFolders(AllUsersDesktop)
print allUserDocs

similarly you can use the following to obtain access to other special folders:
AllUsersDesktop,AllUsersStartMenu,AllUsersPrograms,AllUsersStartupDesktop,Favorites,Fonts,MyDocuments,NetHood,PrintHood,Recent,SendToStartMenu,Startup  Templates
Saludos

Peter Jessop


___
Python-win32 mailing list
Python-win32@python.org
http://mail.python.org/mailman/listinfo/python-win32