View Full Version : Query Registry Values
12-31-2001, 05:10 PM
I need to have a way to query a registry key for all sub keys that exist below it. And have it return a list of those keys.
Can setup factory do this? This is a needed feature for me. The ability to query INI files for a list of all Section names is usefull too.
I am using Setup factory to replace InstallShield. Without those features, i have a couple of projects that i cannot do with Setup Factory until i can figure out how to get it to do it.
There is no way to query the Registry, using Setup Factory 6.0, and return a list of all sub keys.
It is possible to return a list of all section names in an INI file using Setup Factory 6.0. Basically what you would have to do is use a READ TEXT FILE action on the INI file. This will store all the text from the INI in a variable. Then you would use String actions to parse though the INI file. It would be a lot of work, but based upon the structure of INI files and Setup Factory 6.0's String action, this is possible.
01-03-2002, 01:29 PM
I am just curious, Deano. Why do you want to search the subkeys? How can you utilize the value of "an unknown key" ?
01-03-2002, 02:43 PM
I am an internet service provider. Not only am i installing software, i am configuring the computer as well. By quering sections such as the RemoteAccess section, i can see what other dial-up connections the user has on the computer. And the Identities section tells me what outlook express profiles have been configured allready. There are numerous things you can do with that ability.
01-03-2002, 11:11 PM
Originally posted by Mark:
It would be a lot of work...[/B]
Well, not that much work. http://www.indigorose.com/ubb/images/icons/smile.gif Just search for a "[" and a "]", possibly even checking their positions (to make sure they're at the start and end of the line) if you need to...and build a list of the lines that match. (I'd recommend building a character-delimited list, so you could use the Get Delimited String action on it.)
With the ability to import/export action lists, you would only ever have to do the work once; export the actions to a .sfa file, and then just import the .sfa file into your project when you need to query an INI file for section names.
Incidentally, you could use a similar technique to query a registry key for all sub keys below it. You just need to export the desired registry key to a .reg file, which you can do with regedit's /e or /a switch. For example:
regedit /a c:\temp\ie.reg "HKEY_LOCAL_MACHINE\Software\Microsoft\Internet Explorer"
Then just parse the .reg file like any other text file, and count the lines that include the registry key in it.
It's a bit of a kludgy workaround, but it would work. http://www.indigorose.com/ubb/images/icons/smile.gif
Of course, if there's enough demand for it, we could add specialized actions to handle this more easily in the future...
01-04-2002, 03:13 AM
Thank you for your answer. I did know that I always have something new to learn. As usual Lorne has given a good solution for a work-around. It should not be difficult to write a "user defined procedure" (saved as a .sfa) and use it whenever you need to scan the subkeys. As an amateur I succeeded to design an action giving all my dial-up connections in a semicolon-delimited list. The List Box Screen is really a dynamic screen where the result string can be displayed, or it can be used in the Check Box Screen, or …. This is what I find so fascinating with Setup Factory 6. There seems to be "no limit" of what you can achieve. I have used Setup Factory to create a "Check for Web Updates" application and thus given our customers a new service offer
You mentioned "InstallShield": As an end-user I am not fond of this installers consumption of disk space on the system drive. I find Setup Factory to be more "polite".
01-04-2002, 06:04 AM
I am impressed with Setup Factory so far. As for Install Shield, it's not disk space I am concerned with when I choose a tool for my work. Disk space I can increase. Time is something I cannot increase. Setup Factory is far faster in development time for an install. But I do have to say, although far more difficult to use, Install shield is by far more powerful. My tools alone eat up nearly 30 GIG of space on my computer. Not something I really worry about. Mostly programming tools. Not to proficient in C. Unless in UNIX. But I am getting quite good with Visual Basic.
01-04-2002, 02:06 PM
Oh, i am not giving it up. I like the software. I did figure out how to query those keys myself.
I think autoplay menu studio is my fav app from IndigoRose though. I use it often. I think i may buy the new liveupdate thing they have now. Looks good. Price seems a bit high though.
01-04-2002, 11:22 PM
Disk Space is inexpensive these days. I am not worried about the developers disk space, but I am concerned about our customers ("the end user"). My main profession is not to be a system designer – I have some experience with application development, I am not specially clever, but since I have good knowledge of accounting, taxation rules and so on, I know a bit about the trade and the industries needs – AND: since I know a little about the possibilities in data processing, I have a great advantage. At the most I am an "end user". It is annoying to install an application that insist to reside on drive C: when I want the application on drive D: on MY machine. My solution is to have drive C: as a clean system drive. I regularly backup up my system drive through creating an image to a CD-ROM. In that way it is essential to me that the compressed image of drive C: (2 GB) have enough space on a single CD-ROM disc.
At last at the point: As an end user I do not like the Install Shields predilection of drive C: (the hidden directory) when the application is directed to drive D:. I do not know anything at all about creating installers with Install Shield. Surely it is a good application, highly acknowledged. But from the end users point of view, I find Setup Factory to be a good alternative. Version 6 is more "difficult" to learn than version 5, there is indeed a threshold to overcome. But after some weeks playing with Setup Factory, mostly on a hobby basis (some people likes crossword puzzling, for the time being I prefer to give Setup Factory a new challenge), I am impressed of the possibilities of this system. It is not a disadvantage that my "hobby work" results in solutions with benefit to our customers and our internal IT department.
My advice is that you don't "give up" Setup Factory at this stage. If you like, I should be pleased to mail you my little action module that scans the desired subkeys.
(I hope my English formulations are understandable.)
See column "Suggest New Features" (01-09-02)
[This message has been edited by csd214 (edited 01-09-2002).]
Powered by vBulletin™ Version 4.0.6 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.