Read and Write Registry from MapBasic

164 views
Skip to first unread message

Zery

unread,
Dec 18, 2010, 1:20:45 AM12/18/10
to MapInfo-L
Happy holliday all,

It's not a holliday for me, we still have to acomplished our yearly planted target. There's no Sunday here now, well it's another story.

I'm planning to extract a value from a key in windows registry, and sometimes maybe to insert a key and it value. Can someone guide me how to get to it?

TIA
Regards,
Zery

Peter Horsbøll Møller

unread,
Dec 18, 2010, 4:58:37 AM12/18/10
to mapi...@googlegroups.com
Zery,
There are some nice articles on this topic:

And even some using MapBasic:

Peter Horsbøll Møller
Pitney Bowes Business Insight - MapInfo


2010/12/18 Zery <zer...@gmail.com>
--
You received this message because you are subscribed to the
Google Groups "MapInfo-L" group.To post a message to this group, send
email to mapi...@googlegroups.com
To unsubscribe from this group, go to:
http://groups.google.com/group/mapinfo-l/subscribe?hl=en
For more options, information and links to MapInfo resources (searching
archives, feature requests, to visit our Wiki, visit the Welcome page at
http://groups.google.com/group/mapinfo-l?hl=en

Zery

unread,
Dec 18, 2010, 5:30:27 AM12/18/10
to mapi...@googlegroups.com
Thanks Peter. I'm looking forward to get started.

Regards,
Zery


From: Peter Horsbøll Møller <mapi...@horsboll-moller.dk>
Date: Sat, 18 Dec 2010 10:58:37 +0100
Subject: Re: [MI-L] Read and Write Registry from MapBasic

Zery

unread,
Dec 19, 2010, 3:29:25 AM12/19/10
to mapi...@googlegroups.com
So I've looked to the source, and try a little bit. I have attached a sample of my code, the problem I'm getting is it GetMRUPath() functions returns an empty string. Where did it go wrong?

Regards,
Zery
regmapbasic.mb

college.atlas

unread,
Dec 19, 2010, 6:31:46 PM12/19/10
to MapInfo-L
Simple typo Zery. Seems not having a Sunday off is not a good thing.

Your read path iReturn reads "Software\Microsoft\Windows\CurrentVersion
\Explorer\ComDlg2\OpenSaveMRU\wor"

Should read "Software\Microsoft\Windows\CurrentVersion\Explorer
\ComDlg32\OpenSaveMRU\wor" (NOTE ComDlg32 not ComDlg2)

Worked for me straight after that.



On Dec 19, 7:29 pm, Zery <zery...@gmail.com> wrote:
>   So I've looked to the source, and try a little bit. I have attached a
> sample of my code, the problem I'm getting is it GetMRUPath() functions
> returns an empty string. Where did it go wrong?
>
> Regards,
> Zery
>
> On 12/18/2010 4:58 PM, Peter Horsb�ll M�ller wrote:
>
>
>
>
>
>
>
> > Zery,
> > There are some nice articles on this topic:
> >http://support.microsoft.com/kb/145679
> >http://en.wikipedia.org/wiki/Windows_Registry
>
> > And even some using MapBasic:
> > http://www.mail-archive.com/mapinf...@lists.directionsmag.com/msg26315.html
>
> > Peter Horsb�ll M�ller
> > Pitney Bowes Business Insight - MapInfo
>
> > 2010/12/18 Zery <zery...@gmail.com <mailto:zery...@gmail.com>>
>
> >     Happy holliday all,
>
> >     It's not a holliday for me, we still have to acomplished our
> >     yearly planted target. There's no Sunday here now, well it's
> >     another story.
>
> >     I'm planning to extract a value from a key in windows registry,
> >     and sometimes maybe to insert a key and it value. Can someone
> >     guide me how to get to it?
>
> >     TIA
> >     Regards,
> >     Zery
>
> >     --
> >     You received this message because you are subscribed to the
> >     Google Groups "MapInfo-L" group.To post a message to this group, send
> >     email to mapi...@googlegroups.com
> >     <mailto:mapi...@googlegroups.com>
> >     To unsubscribe from this group, go to:
> >    http://groups.google.com/group/mapinfo-l/subscribe?hl=en
> >     For more options, information and links to MapInfo resources
> >     (searching
> >     archives, feature requests, to visit our Wiki, visit the Welcome
> >     page at
> >    http://groups.google.com/group/mapinfo-l?hl=en
>
> > --
> > You received this message because you are subscribed to the
> > Google Groups "MapInfo-L" group.To post a message to this group, send
> > email to mapi...@googlegroups.com
> > To unsubscribe from this group, go to:
> >http://groups.google.com/group/mapinfo-l/subscribe?hl=en
> > For more options, information and links to MapInfo resources (searching
> > archives, feature requests, to visit our Wiki, visit the Welcome page at
> >http://groups.google.com/group/mapinfo-l?hl=en
>
>
>
>  regmapbasic.mb
> 7KViewDownload

Zery

unread,
Dec 19, 2010, 6:59:04 PM12/19/10
to mapi...@googlegroups.com
LOL...you are right, I think I need a coffe, a ciggarete and a
newspaper now, read about our national soccer team win last night.

Regards,
Zery

On 12/20/2010 6:31 AM, college.atlas wrote:
> Simple typo Zery. Seems not having a Sunday off is not a good thing.
>
> Your read path iReturn reads "Software\Microsoft\Windows\CurrentVersion
> \Explorer\ComDlg2\OpenSaveMRU\wor"
>
> Should read "Software\Microsoft\Windows\CurrentVersion\Explorer
> \ComDlg32\OpenSaveMRU\wor" (NOTE ComDlg32 not ComDlg2)
>
> Worked for me straight after that.
>
>
>
> On Dec 19, 7:29 pm, Zery<zery...@gmail.com> wrote:
>> So I've looked to the source, and try a little bit. I have attached a
>> sample of my code, the problem I'm getting is it GetMRUPath() functions
>> returns an empty string. Where did it go wrong?
>>
>> Regards,
>> Zery
>>

>> On 12/18/2010 4:58 PM, Peter Horsb�ll M�ller wrote:
>>
>>
>>
>>
>>
>>
>>
>>> Zery,
>>> There are some nice articles on this topic:
>>> http://support.microsoft.com/kb/145679
>>> http://en.wikipedia.org/wiki/Windows_Registry
>>> And even some using MapBasic:
>>> http://www.mail-archive.com/mapinf...@lists.directionsmag.com/msg26315.html

>>> Peter Horsb�ll M�ller

James Moloney

unread,
Jan 22, 2014, 10:21:58 PM1/22/14
to mapi...@googlegroups.com
Hi,
 
There is a complete example of how to read, write and delete registry keys here http://mapbasichelp.blogspot.com.au/2014/01/create-modify-query-and-delete-registry_13.html if anyone is ever interested
 
Cheers
 
James Moloney
Reply all
Reply to author
Forward
0 new messages