1. How to read from the Windows registry

I would like to know if a particular software package is installed on my computer, and if so, what is the path to it. My idea is to search and read the windows registry. I would appreciate any ideas of how to do this in Euphoria. Thank you.

new topic     » topic index » view message » categorize

2. Re: How to read from the Windows registry

penpal0andrew said...

I would like to know if a particular software package is installed on my computer, and if so, what is the path to it. My idea is to search and read the windows registry. I would appreciate any ideas of how to do this in Euphoria. Thank you.

There is probably a library in the archives for this, though I don't know of one offhand. Possibly win32lib already has this builtin.

If you want to do it the hard way, use dll.e to wrap http://msdn.microsoft.com/en-us/library/ms724897(VS.85).aspx, http://msdn.microsoft.com/en-us/library/ms724845(VS.85).aspx, etc (see http://msdn.microsoft.com/en-us/library/ms725488(VS.85).aspx for more examples).

new topic     » goto parent     » topic index » view message » categorize

3. Re: How to read from the Windows registry

jimcbrown said...
penpal0andrew said...

I would like to know if a particular software package is installed on my computer, and if so, what is the path to it. My idea is to search and read the windows registry. I would appreciate any ideas of how to do this in Euphoria. Thank you.

There is probably a library in the archives for this, though I don't know of one offhand. Possibly win32lib already has this builtin.

If you want to do it the hard way, use dll.e to wrap http://msdn.microsoft.com/en-us/library/ms724897(VS.85).aspx, http://msdn.microsoft.com/en-us/library/ms724845(VS.85).aspx, etc (see http://msdn.microsoft.com/en-us/library/ms725488(VS.85).aspx for more examples).

I was thinking that the standard library needs a configuration file (config.e) that would write cross-platform configuration files using native backends. For instance, registry on Windows and a simple $HOME/.dotfile on Unix.

Jeremy

new topic     » goto parent     » topic index » view message » categorize

4. Re: How to read from the Windows registry

The following file in the archive will allow access to the registry:

http://www.rapideuphoria.com/reg.zip

It does not require Win32lib.

The archive also shows an updated version by Shawn Pringle but the link was broken.

If you know the registry locations the application uses it should be easy to do what you want. There are conventions for this but no firm standards. Searching the registry is more complex.

new topic     » goto parent     » topic index » view message » categorize

5. Re: How to read from the Windows registry

jeremy said...

I was thinking that the standard library needs a configuration file (config.e) that would write cross-platform configuration files using native backends. For instance, registry on Windows and a simple $HOME/.dotfile on Unix.

Jeremy

This is just my personal preference, but I'd support a library that allows for cross-platform configuration files (such that the files can be copied from OS to another and still work).

On the other hand, a library that supports using backends such as w32 registry, gconf-2, etc would be more useful, but would also be a larger undertaking.

new topic     » goto parent     » topic index » view message » categorize

6. Re: How to read from the Windows registry

jimcbrown said...
jeremy said...

I was thinking that the standard library needs a configuration file (config.e) that would write cross-platform configuration files using native backends. For instance, registry on Windows and a simple $HOME/.dotfile on Unix.

This is just my personal preference, but I'd support a library that allows for cross-platform configuration files (such that the files can be copied from OS to another and still work).

On the other hand, a library that supports using backends such as w32 registry, gconf-2, etc would be more useful, but would also be a larger undertaking.

I was thinking that you could force using a particular backend, dot files for instance on any platform.

Jeremy

new topic     » goto parent     » topic index » view message » categorize

7. Re: How to read from the Windows registry

jeremy said...

I was thinking that you could force using a particular backend, dot files for instance on any platform.

Jeremy

I second this.

Off topic, I am suprised to see that you can create dot files on Windows 98. I was under the impression that this was impossible to do on a VFAT.

new topic     » goto parent     » topic index » view message » categorize

8. Re: How to read from the Windows registry

jeremy said...

I was thinking that the standard library needs a configuration file (config.e) that would write cross-platform configuration files using native backends. For instance, registry on Windows and a simple $HOME/.dotfile on Unix.

That would be very cool, though it should have an option to allow the programmer to bypass the native backend and use a simple text file if so desired.

new topic     » goto parent     » topic index » view message » categorize

9. Re: How to read from the Windows registry

jeremy said...

I was thinking that the standard library needs a configuration file (config.e) that would write cross-platform configuration files using native backends. For instance, registry on Windows and a simple $HOME/.dotfile on Unix.

Jeremy

wxEuphoria does this with wxConfig.

wxEuphoria Docs said...

wxConfig allows you to write the same code regardless of whether you're working with the registry under Win32 or text-based config files under Unix. To make writing the portable code even easier, wxEuphoria automatically maps to the native wxConfig implementation on the given platform: i.e. wxRegConfig under Win32 and wxFileConfig otherwise.

-Greg

new topic     » goto parent     » topic index » view message » categorize

10. Re: How to read from the Windows registry

ghaberek said...
jeremy said...

I was thinking that the standard library needs a configuration file (config.e) that would write cross-platform configuration files using native backends. For instance, registry on Windows and a simple $HOME/.dotfile on Unix.

Jeremy

wxEuphoria does this with wxConfig.

Yes, but wxWidgets is a huge library if you just need a way to store configuration details.

Jeremy

new topic     » goto parent     » topic index » view message » categorize

11. Re: How to read from the Windows registry

jimcbrown said...
jeremy said...

I was thinking that the standard library needs a configuration file (config.e) that would write cross-platform configuration files using native backends. For instance, registry on Windows and a simple $HOME/.dotfile on Unix.

Jeremy

This is just my personal preference, but I'd support a library that allows for cross-platform configuration files (such that the files can be copied from OS to another and still work).

On the other hand, a library that supports using backends such as w32 registry, gconf-2, etc would be more useful, but would also be a larger undertaking.

wxWidgets has some classes (unwrapped by wxEuphoria, unless Greg has done it while I wasn't looking) that handles configuration files. I think that it writes to the registry on Windows, and writes text files (possibly xml, but I'm not sure) on unix-like operating systems.

Matt

new topic     » goto parent     » topic index » view message » categorize

12. Re: How to read from the Windows registry

I find regedit in windows very useful to find things in the registry.

Go start/run/cmd/regedit.

Not euphoria though.

I suppose you know be very careful (back-up) before making changes in the registry.

Don Cole A Bug is an un-documentedfeature. A Feature is a documented Bug.

new topic     » goto parent     » topic index » view message » categorize

13. Re: How to read from the Windows registry

mattlewis said...

wxWidgets has some classes (unwrapped by wxEuphoria, unless Greg has done it while I wasn't looking) that handles configuration files. I think that it writes to the registry on Windows, and writes text files (possibly xml, but I'm not sure) on unix-like operating systems.

Matt

I think you missed my response...

ghaberek said...

wxEuphoria does this with wxConfig.

wxEuphoria Docs said...

wxConfig allows you to write the same code regardless of whether you're working with the registry under Win32 or text-based config files under Unix. To make writing the portable code even easier, wxEuphoria automatically maps to the native wxConfig implementation on the given platform: i.e. wxRegConfig under Win32 and wxFileConfig otherwise.

I snuck it into the 0.12.2 release. grin

-Greg

new topic     » goto parent     » topic index » view message » categorize

14. Re: How to read from the Windows registry

LarryMiller said...

The following file in the archive will allow access to the registry:

http://www.rapideuphoria.com/reg.zip

It does not require Win32lib.

The archive also shows an updated version by Shawn Pringle but the link was broken.

If you know the registry locations the application uses it should be easy to do what you want. There are conventions for this but no firm standards. Searching the registry is more complex.

This was very helpful. Thank you.

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu