Hi Stuart, On Win2K it's located at: C:\Documents and Settings\(username)\Application Data\MapInfo\MapInfo\MAPINFOW.PRF On multiuser Win98 it's located under C:\Windows\Profiles\(username)\Application Data\MapInfo\MapInfo\MAPINFOW.PRF In MB 6.5 one off course uses LocateFile$(LOCATE_PREF_FILE)
It's indeed a binary file, and it's structure is unfortunately not just 256 bytes records, but a little more complex. And it's content is also version dependent. At some point, 5.0/5.5/6.0?, it increased in size, so a general approach would need to handle two structures. I was looking into it a while ago, trying to dechiper it to enable editing of it thru MapBasic. Especially the MRU list is interesting to access, espcially to clear, since all programmatically run workspaces and programs are also added to it for some obscure reason. But a lot of the content is unfortunately still unintelligable to me, and the current version even contains unused historical baggage as far as I can see. A real mess. But opening it in binary mode for editing is very possible, also in MapBasic, if one knows where and what to look for. So go for it :-) If you're "only" after the directories, it is fairly easy to compile a list of offset+length at least for the singular directory settings, so here goes: Tables 4962 + 256 Workspaces: 5218 + 256 MB apps: 5474 + 256 Custsymb: 9828 + 256 Imports: 10084 + 256 SQL queries:10340 + 256 Thematix:10596 + 256 Saved queries: 10852 + 256 Grids: 11108 + 256 Reports: 11364 + 256 Graphs: 11620 + 256 Reading e.g. the path name for Graph Support can be done as follows: Include "mapbasic.def" Declare Sub main Sub main Dim pthnam As String*256 Open File LocateFile$(LOCATE_PREF_FILE) For Binary Access Read As #77 Charset "WindowsLatin1" Get #77,11620,pthnam Close File #77 Note "Graph Files: "+RTrim$(pthnam) End Sub Best regards/Med venlig hilsen Lars V. Nielsen GisPro, Denmark http://www.gispro.dk/ http://hjem.get2net.dk/lars-online/ WGS84: 10.20'40"E 55.20'20"N ----- Original Message ----- From: "Stuart Jones" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, November 29, 2002 12:52 PM Subject: RE: MI-L Reading MapInfo preferences programmatically I'm after the information configured by doing this in MapInfo: Options > Preferences... > Directories... Hex editing? There's a first time for everything I s'pose... > -----Original Message----- > From: Simmonds, Ashley (PTB) [mailto:[EMAIL PROTECTED]] > Sent: 29 November 2002 11:44 > To: Stuart Jones > Subject: RE: MI-L Reading MapInfo preferences programmatically > > > aah, found it, under C:\WINNT\... > > i don't have a hex editor on this machine, but it looks like > a standard data > output file, 256 bytes per record. > > it appears to contain the MRU (recently used) list, and maybe > some other > stuff. but i don't know about user-specific directory structures. > > do you mean like where people save stuff or their personal > tools/addins and > things like that? > > ash > > -----Original Message----- > From: Stuart Jones > [mailto:[EMAIL PROTECTED]] > Sent: Friday, 29 November 2002 10:03 PM > To: Simmonds, Ashley (PTB) > Subject: RE: MI-L Reading MapInfo preferences programmatically > > > Hmm, good assumption. The .PRF is indeed located [at werst] in: > > Drive:\Documents and Settings\Username\Application > Data\MapInfo\MapInfo\ > > But it ain't a text file :( > > > > -----Original Message----- > > From: Simmonds, Ashley (PTB) [mailto:[EMAIL PROTECTED]] > Sent: 29 November 2002 11:24 > To: 'Mapinfo List (E-mail)' > Subject: RE: MI-L Reading MapInfo preferences programmatically > > > perhaps i'm naive, but i haven't come across this file. > > i would assume such information is stored within the > registry, or at werst > under: > "Drive:\Documents and Settings\Username\Local > Settings\Blah.BLH". > > but that's a another different kettle of a horse coloured fish. > > ash > > -----Original Message----- > From: Stuart Jones > [mailto:[EMAIL PROTECTED]] > Sent: Friday, 29 November 2002 9:40 PM > To: [EMAIL PROTECTED] > Subject: MI-L Reading MapInfo preferences programmatically > > > Greetings > > Anyone know the record structure of the MAPINFOW.PRF > preference file (where > various user-specific directory information is held)? I'd > like to be able to > obtain certain information from this file programmatically. > > Thanks in advance. > > Regards, > Stuart Jones. > > Aligned Assets > Bradstone Brook > Christmas Hill > Shalford > Surrey > GU4 8HR > > +44 (0)1483 469 400 > www.aligned-assets.co.uk > > --------------------------------------------------------------------- > List hosting provided by Directions Magazine | www.directionsmag.com | > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: > [EMAIL PROTECTED] > Message number: 4340 > > --------------------------------------------------------------------- List hosting provided by Directions Magazine | www.directionsmag.com | To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Message number: 4343 --------------------------------------------------------------------- List hosting provided by Directions Magazine | www.directionsmag.com | To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Message number: 4355
