Results 1 to 7 of 7

Thread: [RESOLVED] VB6 QUESTION: Lazy person wants code to read the start menu

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Feb 2014
    Location
    Norfolk UK (inbred)
    Posts
    836

    Resolved [RESOLVED] VB6 QUESTION: Lazy person wants code to read the start menu

    I apologise, the lazy person is me.

    I am looking for some code to find out what programs are installed into the Windows o/s. I understand largely what needs to be done, open the two start menu menu locations, system and user, trawl through the folder structure and make a list of installed program shortcuts. I expect it may also have to trawl through the registry to determine what is installed but not actually in the start menu.

    If such code already existed in VB6 then it would be most useful as a reference, otherwise I will have to start coding it myself, lazy bu@@er that I am.

    So, this is just a call-out to anyone that may have come across such VB6 code, if you have, do let me know please. It would help.

  2. #2
    PowerPoster SamOscarBrown's Avatar
    Join Date
    Aug 2012
    Location
    NC, USA
    Posts
    7,797

    Re: VB6 QUESTION: Lazy person wants code to read the start menu

    possible to call this command line solution?????

    https://kencenerelli.wordpress.com/2...on-windows-10/
    Sam I am (as well as Confused at times).

  3. #3
    PowerPoster SamOscarBrown's Avatar
    Join Date
    Aug 2012
    Location
    NC, USA
    Posts
    7,797

    Re: VB6 QUESTION: Lazy person wants code to read the start menu

    This is a bit slow (when I ran it by command line alone), but it did produce a list of all the programs installed on my computer...
    Sam I am (as well as Confused at times).

  4. #4

    Thread Starter
    Fanatic Member
    Join Date
    Feb 2014
    Location
    Norfolk UK (inbred)
    Posts
    836

    Re: VB6 QUESTION: Lazy person wants code to read the start menu

    That is an interesting solution, it wasn't how I expected to extract that information, I was expecting a combination of a folder search and a registry trawl but that is a definite alternative as long as it is multi-version windows compatible. I wonder if that particular command works on all flavours of Windows. I don't have an XP system at the moment (a capacitor went kapuff) so if anyone has a working version and could try it I would really appreciate it.

  5. #5
    PowerPoster SamOscarBrown's Avatar
    Join Date
    Aug 2012
    Location
    NC, USA
    Posts
    7,797

    Re: VB6 QUESTION: Lazy person wants code to read the start menu

    Works on 10, that's all I know. But I also saw some registry searches in .Net as well...so that is a possibility, for sure.

    Good luck...
    Sam I am (as well as Confused at times).

  6. #6

    Thread Starter
    Fanatic Member
    Join Date
    Feb 2014
    Location
    Norfolk UK (inbred)
    Posts
    836

    Re: VB6 QUESTION: Lazy person wants code to read the start menu

    A quick search tells me that WMIC is NOT available on Windows XP editions other than PRO so it is not an option for my program. I would have to bundle wmic.exe with the program itself and that feels inelegant and possibly breaks a Windows licence.

    Oh yes there are a number of locations in the windows registry where program information is maintained and you'd expect it would all be contained within one central section but that seems not to be the case. I have written a program that already looks in HKEY_LOCAL_MACHINE, "Software\Microsoft\Windows\CurrentVersion\Uninstall and that so far seemed to be the best place to identify programs registered with Windows but I know there are others.
    Last edited by yereverluvinuncleber; Apr 13th, 2021 at 10:03 AM.

  7. #7

    Thread Starter
    Fanatic Member
    Join Date
    Feb 2014
    Location
    Norfolk UK (inbred)
    Posts
    836

    Re: [RESOLVED] VB6 QUESTION: Lazy person wants code to read the start menu

    In the end I added a recursive search for all .lnk files for the start menu in either %userprofile% or %programdata% + "\Microsoft\Windows\Start Menu\Programs" and in addition extracted the registry entries under HKLM"Software\Microsoft\Windows\CurrentVersion\Uninstall" and HKLM"Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall"

    The result was output to a listbox.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width