Jump to content
Macro Express Forums

List of Installed programs


patgenn123

Recommended Posts

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

Link to comment
Share on other sites

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".

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...