patgenn123 Posted September 8, 2008 Report Share Posted September 8, 2008 Hello all. I was wondering if anyone knew how to create a list of installed programs? I mean the list of all programs in the "Add/Remove" screen? I know how to append to text and repeat through the list, but where do you go to get this information and how does it translate to Macro Express? I keep seeing the list in the registry under HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\ but there are lots of number strings that would make no sense to put in a text file. I know they translate into programs because by opening them, one could see they belong as a program, but how do you just get the names of the files? Thanks! Pat Quote Link to comment Share on other sites More sharing options...
kevin Posted September 8, 2008 Report Share Posted September 8, 2008 What I see is that each of the registry keys, whether they have a name or are a GUID, contain a registry value of 'DisplayName' that corresponds to the name that is displayed in the Add/Remove Programs control panel applet. Quote Link to comment Share on other sites More sharing options...
patgenn123 Posted September 9, 2008 Author Report Share Posted September 9, 2008 Kevin, Any hint on how to proceed? I have never used the "registry part" of Macro Express so i am really gunshy on this knowing it's the registry... Thanks! Pat Quote Link to comment Share on other sites More sharing options...
rberq Posted September 9, 2008 Report Share Posted September 9, 2008 Like a fear of high places, being shy about messing with the registry is a healthy instinct. However, you can run regedit.exe as a batch command, with an option to put the registry out to a text file. Then you can use ME to examine or play with the text file to your heart's content, without worrying that you will damage the actual registry. Do a Google search of regedit command line options. I believe the command is "regedit.exe /e filename.txt". Quote Link to comment Share on other sites More sharing options...
patgenn123 Posted September 9, 2008 Author Report Share Posted September 9, 2008 rberg, Thank you! I ran this in "run" -- > regedit.exe /e F:\Favorites\FileName.txt. It worked! Thank you!!!! 2 questions: 1) How do I run this occasionally through ME so i can update the list every day? Launch doesn't seem to work. 2)Is there an easier way through ME? There is a registry command with "read registry string" in %T1%(or whatever variable you want). Again, Thanks a million! A million dollars? I dunno.. Pat Quote Link to comment Share on other sites More sharing options...
Cory Posted September 9, 2008 Report Share Posted September 9, 2008 I don't agree with rberg. If you're only reading values from you're not going to do any harm and if you're writing your own keys to your own area you're not going go wrong. IOW just use some common sense. I use the registry as a handy place to pass variables between subroutines, set macro preferences and all kinds of things. But I do like rbergs suggestion because it solves a long time question I had and that is how to get registry keys if you don't know what they are in the first place. Good going! You should be able to run it just like this: <LAUNCHDEL2:0:01regedit.exe<PARAM>/e c:\test.txt3> and schedule the macro to run at whatever interval you like. For things like these I like the "Time Out" scheduling option. This way it only runs when your machine is idle. Usually I pop up a little timed abort box JiC. Quote Link to comment Share on other sites More sharing options...
Cory Posted September 9, 2008 Report Share Posted September 9, 2008 Heyyyyyyyy!!!! I just realized the export of the registry is in INI file format! This means you can use the Variable Set String from INI File command to easily get stuff out of it! However I did also notice it does not export the HKCU hive so to get anything in there I think you have to resolve the GUID to find anything for the current user. Quote Link to comment Share on other sites More sharing options...
patgenn123 Posted September 9, 2008 Author Report Share Posted September 9, 2008 Cory, OK. That worked(the run part <LAUNCHDEL2:0:01regedit.exe<PARAM>/e c:\test.txt3>), but what did you mean by your last post? Could you give a little more detail? I have no idea of how to structure the .ini(or extract it from the ini file)from what you are saying. Also, why can't one use the "registry" portion of Macro Express, go to HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\ and loop through that section only to get the names of the installed files? Pat Quote Link to comment Share on other sites More sharing options...
selkov Posted September 9, 2008 Report Share Posted September 9, 2008 I think this free program might be of interest to you" http://www.belarc.com/ Download it and run it. it will give you a list of all installed software, and more.... Quote Link to comment Share on other sites More sharing options...
patgenn123 Posted September 9, 2008 Author Report Share Posted September 9, 2008 Selkov, Thanks for the tip!!!!!! I am installing it as we speak. However, I would like see if anyone could answer the 2 issues I posted. Any takers? Thanks! Pat Quote Link to comment Share on other sites More sharing options...
Cory Posted September 10, 2008 Report Share Posted September 10, 2008 Read here about INI files. Basically back in the old Windows 3.1 days that's how programs saved their configurations and such. They conform to strict rules of formatting and such much like todays XML files. But they could easily get corrupted, lost and whatever so the Windows System Registry was designed as a database to replace them. But because they were so common programmers wrote interfaces for them. You see if you stored some setting in a file for me I would need to read it into a variable, look for some hallmark, determine length and such and copy it out. A lot of steps. But most programming languages and such, including ME3, has the ability to simply say Go to boot.ini, section Something, parameter something else, and read in what's there. Much simpler! Well I recommend that this is how you access this file since it is being exported to an INI format. The sections are the bits in square brackets and the parameters are the bits before the equals sign. Try it, it works great. Now as for why we can't get all the keys under a registry branch... Well there is no command I'm aware of in ME3. You can get the value at a specific registry key but not all of them under a certain branch. This is why the file export technique shows promise. You will need to read the entire thing in as a variable and parse out the chunk you need but that's not too difficult. The other possibility I would look into if I were you its to see if you can export just part of the registry. I know you can do it in Regedit but maybe there's an equivalent way to do it with the command line parameter. Quote Link to comment Share on other sites More sharing options...
rberq Posted September 10, 2008 Report Share Posted September 10, 2008 Yes, you definitely can export just part of the registry using command line parameters. Again, just do a Google search. I believe you just put the piece you want at the end of the command: regedit.exe /e destinationfile.txt [HKEY_LOCAL_MACHINE.......... Quote Link to comment Share on other sites More sharing options...
patgenn123 Posted September 11, 2008 Author Report Share Posted September 11, 2008 Thanks! You don't need the brackets. I tried it myself. Pat Quote Link to comment Share on other sites More sharing options...
paul Posted September 11, 2008 Report Share Posted September 11, 2008 I don't agree with rberg... if you're writing your own keys to your own area you're not going go wrong. Well, that's perfectly true as long as you don't make a mistake! But a lack of concentration at the wrong time could well lead to a catastrophe. Quote Link to comment Share on other sites More sharing options...
terrypin Posted September 14, 2008 Report Share Posted September 14, 2008 I don't agree with rberg. If you're only reading values from you're not going to do any harm and if you're writing your own keys to your own area you're not going go wrong. IOW just use some common sense. I use the registry as a handy place to pass variables between subroutines, set macro preferences and all kinds of things. But I do like rbergs suggestion because it solves a long time question I had and that is how to get registry keys if you don't know what they are in the first place. Good going! You should be able to run it just like this: <LAUNCHDEL2:0:01regedit.exe<PARAM>/e c:\test.txt3> and schedule the macro to run at whatever interval you like. For things like these I like the "Time Out" scheduling option. This way it only runs when your machine is idle. Usually I pop up a little timed abort box JiC. Hi Cory, Just been experimenting with this out of curiosity. The following commands Read Registry String: "DisplayName" Delay 100 Milliseconds Text Box Display: Macro Return gets me the first entry HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{00040409-78E1-11D2-B60F-006097C998E7}\DisplayName But how would you iterate from there through the entire long list? -- Terry, East Grinstead, UK Quote Link to comment Share on other sites More sharing options...
terrypin Posted September 17, 2008 Report Share Posted September 17, 2008 Hi Cory, Just been experimenting with this out of curiosity. The following commands Read Registry String: "DisplayName" Delay 100 Milliseconds Text Box Display: Macro Return gets me the first entry HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{00040409-78E1-11D2-B60F-006097C998E7}\DisplayName But how would you iterate from there through the entire long list? -- Terry, East Grinstead, UK Anyone? -- Terry, East Grinstead, UK Quote Link to comment Share on other sites More sharing options...
kevin Posted September 17, 2008 Report Share Posted September 17, 2008 The Macro Express commands read a the value from a registry key as long as you (your macro) knows the name of the key. The suggestion earlier in this thread to export the registry is a good way to get a list of unknown keys. Quote Link to comment Share on other sites More sharing options...
terrypin Posted September 18, 2008 Report Share Posted September 18, 2008 The Macro Express commands read a the value from a registry key as long as you (your macro) knows the name of the key. The suggestion earlier in this thread to export the registry is a good way to get a list of unknown keys. Thanks Kevin. I'll explore that. I was wondering if there might be a more direct way of somehow repeatedly reading through the registry values downwards from that first one. -- Terry, East Grinstead, UK Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.