EnableExplicit Procedure.s GetSpecialFolder(CSIDL.l) Protected *itemid.ITEMIDLIST Protected location.s = Space(#MAX_PATH) If SHGetSpecialFolderLocation_ (0, CSIDL, @*itemid) = #NOERROR If SHGetPathFromIDList_(*itemid, @location) CoTaskMemFree_(*itemid) If Right(location, 1) <> "\" : location + "\" EndIf ProcedureReturn location EndIf EndIf EndProcedure MessageRequester("","Pfad: "+GetSpecialFolder(#CSIDL_APPDATA),0) ;MessageRequester("","Pfad: "+GetSpecialFolder(#CSIDL_COMMON_STARTMENU),0) ;MessageRequester("","Pfad: "+GetSpecialFolder(#CSIDL_STARTMENU),0) ;MessageRequester("","Pfad: "+GetSpecialFolder(#CSIDL_DESKTOP),0)