Author Topic: Looking for someone who's delved into the Registry hard core.  (Read 1801 times)

GuruSR

  • Member
  • **
  • Posts: 116
  • Assembler (6500, 68k, Intel), C(all), VB6, no .Net
Re: Looking for someone who's delved into the Registry hard core.
« Reply #15 on: October 08, 2016, 05:49:04 AM »
Of course you're welcome to post anything interesting here. Most masm32'ers have short attention spans, but sizable projects have been posted

Well, one program I've "back burnered" temporarily until I solve it (finding the actual .lnk target when it's dealing with a classid, because the normal methods don't let you get that id, so I have to actually read the .lnk format and get it that way, ugh).  And see if anyone's got a workaround for the directory bug in Windows 8.  Checking for a file existing in 8 returns false on weird occasions.  Though, that program actually was started way back in '99 (because I hate the Start Menu, of any kind or flavor) in spite of the lack of application sorting anywhere (Windows 3 let you drag items into "folders" in Progman, but in Explorer you had this silly list you had to sift through, add 300+ programs later and well, where did it go?  I wrote a graphical (yes, you can shudder) means of including links into pop up spots on the desktop, animated ones too.  I have one for Coding, have all my coding shortcuts in there, one for Internet, well, a lot of them actually.  The whole thing also monitors the removal and insertion of drives and will recheck shortcuts in them, hiding ones that "aren't there" (hence the hold off due to Windows 8's bug and it cant' find classid targets [Office Shortcuts]).  If you had to see what I meant, look at any Android phone or tablet, the folders are similar to what it does. I almost never use the Start Menu and am happier for it.

GuruSR.
Learned 68k Motorola Asm instruction set in 30 minutes on the way to an Amiga Developer's Forum meeting.
Following week wrote a kernel level memory pool manager in 68k assembler for fun.

GuruSR

  • Member
  • **
  • Posts: 116
  • Assembler (6500, 68k, Intel), C(all), VB6, no .Net
Re: Looking for someone who's delved into the Registry hard core.
« Reply #16 on: October 08, 2016, 07:29:55 AM »
Maybe even get a webspace going for putting up some of my software for others to gawk at (and laugh at my ugly GUIs).

Of course you're welcome to post anything interesting here. Most masm32'ers have short attention spans, but sizable projects have been posted

Well, when I get around to finding some webspace, I may just get some of them put there to save web traffic costs here.

And ever wrack your brain on a bug in your code that when you find it, is so blazingly simple that you passed by it for 2 months?  I think I just did...

Below is an original class registration (ComDLG32.OCX, just got it by watching the install of the software, it was the last one so I used it as a test), but below *IS* the original.

Code: [Select]
Windows Registry Editor Version 5.00

<HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID\{F9043C85-F6F2-101A-A3C9-08002B2F49FB}>
@="Microsoft Common Dialog Control, version 6.0 (SP6)"

<HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID\{F9043C85-F6F2-101A-A3C9-08002B2F49FB}\Control>

<HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID\{F9043C85-F6F2-101A-A3C9-08002B2F49FB}\Implemented Categories>

<HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID\{F9043C85-F6F2-101A-A3C9-08002B2F49FB}\Implemented Categories\{0DE86A52-2BAA-11CF-A229-00AA003D7352}>

<HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID\{F9043C85-F6F2-101A-A3C9-08002B2F49FB}\Implemented Categories\{0DE86A53-2BAA-11CF-A229-00AA003D7352}>

<HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID\{F9043C85-F6F2-101A-A3C9-08002B2F49FB}\Implemented Categories\{0DE86A57-2BAA-11CF-A229-00AA003D7352}>

<HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID\{F9043C85-F6F2-101A-A3C9-08002B2F49FB}\Implemented Categories\{40FC6ED4-2438-11CF-A3DB-080036F12502}>

<HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID\{F9043C85-F6F2-101A-A3C9-08002B2F49FB}\Implemented Categories\{40FC6ED5-2438-11CF-A3DB-080036F12502}>

<HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID\{F9043C85-F6F2-101A-A3C9-08002B2F49FB}\Implemented Categories\{7DD95802-9882-11CF-9FA9-00AA006C42C4}>

<HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID\{F9043C85-F6F2-101A-A3C9-08002B2F49FB}\InprocServer32>
@="C:\\Windows\\system32\\comdlg32.ocx"
"ThreadingModel"="Apartment"

<HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID\{F9043C85-F6F2-101A-A3C9-08002B2F49FB}\MiscStatus>
@="0"

<HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID\{F9043C85-F6F2-101A-A3C9-08002B2F49FB}\MiscStatus\1>
@="132499"

<HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID\{F9043C85-F6F2-101A-A3C9-08002B2F49FB}\ProgID>
@="MSComDlg.CommonDialog.1"

<HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID\{F9043C85-F6F2-101A-A3C9-08002B2F49FB}\Programmable>

<HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID\{F9043C85-F6F2-101A-A3C9-08002B2F49FB}\ToolboxBitmap32>
@="C:\\Windows\\system32\\comdlg32.ocx, 1"

<HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID\{F9043C85-F6F2-101A-A3C9-08002B2F49FB}\TypeLib>
@="{F9043C88-F6F2-101A-A3C9-08002B2F49FB}"

<HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID\{F9043C85-F6F2-101A-A3C9-08002B2F49FB}\Version>
@="1.2"

<HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID\{F9043C85-F6F2-101A-A3C9-08002B2F49FB}\VersionIndependentProgID>
@="MSComDlg.CommonDialog"

I made the square brackets into < and > to avoid crashing the board's scripting (which I did), script went unresponsive on the browser, oops my bad.  And below is the installation of the same program on the Windows 7 64 bit, practically identical except for where it's stored and where the file is.

Code: [Select]
Windows Registry Editor Version 5.00

<HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Classes\CLSID\{F9043C85-F6F2-101A-A3C9-08002B2F49FB}>
@="Microsoft Common Dialog Control, version 6.0 (SP6)"

<HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Classes\CLSID\{F9043C85-F6F2-101A-A3C9-08002B2F49FB}\Control>

<HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Classes\CLSID\{F9043C85-F6F2-101A-A3C9-08002B2F49FB}\Implemented Categories>

<HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Classes\CLSID\{F9043C85-F6F2-101A-A3C9-08002B2F49FB}\Implemented Categories\{0DE86A52-2BAA-11CF-A229-00AA003D7352}>

<HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Classes\CLSID\{F9043C85-F6F2-101A-A3C9-08002B2F49FB}\Implemented Categories\{0DE86A53-2BAA-11CF-A229-00AA003D7352}>

<HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Classes\CLSID\{F9043C85-F6F2-101A-A3C9-08002B2F49FB}\Implemented Categories\{0DE86A57-2BAA-11CF-A229-00AA003D7352}>

<HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Classes\CLSID\{F9043C85-F6F2-101A-A3C9-08002B2F49FB}\Implemented Categories\{40FC6ED4-2438-11CF-A3DB-080036F12502}>

<HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Classes\CLSID\{F9043C85-F6F2-101A-A3C9-08002B2F49FB}\Implemented Categories\{40FC6ED5-2438-11CF-A3DB-080036F12502}>

<HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Classes\CLSID\{F9043C85-F6F2-101A-A3C9-08002B2F49FB}\Implemented Categories\{7DD95802-9882-11CF-9FA9-00AA006C42C4}>

<HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Classes\CLSID\{F9043C85-F6F2-101A-A3C9-08002B2F49FB}\InprocServer32>
@="C:\\Windows\\SysWow64\\ComDlg32.ocx"
"ThreadingModel"="Apartment"

<HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Classes\CLSID\{F9043C85-F6F2-101A-A3C9-08002B2F49FB}\MiscStatus>
@="0"

<HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Classes\CLSID\{F9043C85-F6F2-101A-A3C9-08002B2F49FB}\MiscStatus\1>
@="132499"

<HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Classes\CLSID\{F9043C85-F6F2-101A-A3C9-08002B2F49FB}\ProgID>
@="MSComDlg.CommonDialog.1"

<HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Classes\CLSID\{F9043C85-F6F2-101A-A3C9-08002B2F49FB}\Programmable>

<HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Classes\CLSID\{F9043C85-F6F2-101A-A3C9-08002B2F49FB}\ToolboxBitmap32>
@="C:\\Windows\\SysWow64\\ComDlg32.ocx, 1"

<HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Classes\CLSID\{F9043C85-F6F2-101A-A3C9-08002B2F49FB}\TypeLib>
@="{F9043C88-F6F2-101A-A3C9-08002B2F49FB}"

<HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Classes\CLSID\{F9043C85-F6F2-101A-A3C9-08002B2F49FB}\Version>
@="1.2"

<HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Classes\CLSID\{F9043C85-F6F2-101A-A3C9-08002B2F49FB}\VersionIndependentProgID>
@="MSComDlg.CommonDialog"

And below, is part of the .reg file my software MADE to restore it from the first one to produce the second one, notice anything missing?  I sure did!

Code: [Select]
<HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID\{F9043C85-F6F2-101A-A3C9-08002B2F49FB}>
@="Microsoft Common Dialog Control, version 6.0 (SP6)"

<HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID\{F9043C85-F6F2-101A-A3C9-08002B2F49FB}\InprocServer32>
@="{!WINSYSDIR!}\\comdlg32.ocx"
"ThreadingModel"="Apartment"

<HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID\{F9043C85-F6F2-101A-A3C9-08002B2F49FB}\MiscStatus>
@="0"

<HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID\{F9043C85-F6F2-101A-A3C9-08002B2F49FB}\MiscStatus\1>
@="132499"

<HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID\{F9043C85-F6F2-101A-A3C9-08002B2F49FB}\ProgID>
@="MSComDlg.CommonDialog.1"

<HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID\{F9043C85-F6F2-101A-A3C9-08002B2F49FB}\ToolboxBitmap32>
@="{!WINSYSDIR!}\\comdlg32.ocx, 1"

<HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID\{F9043C85-F6F2-101A-A3C9-08002B2F49FB}\TypeLib>
@="{F9043C88-F6F2-101A-A3C9-08002B2F49FB}"

<HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID\{F9043C85-F6F2-101A-A3C9-08002B2F49FB}\Version>
@="1.2"

<HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID\{F9043C85-F6F2-101A-A3C9-08002B2F49FB}\VersionIndependentProgID>
@="MSComDlg.CommonDialog"

What I was doing was taking each "key section" in, breaking them up into line entries, entry 0 was the actual key ( < the keys are like this > ) and the rest are those key's values, noticably the ones missing have no values!  Why?  I was recording the last entry that *HAD* anything in it (which in the event of the first entry would be... ZERO), and at the end would return a bool of true or false if the last entry having anything in it wasn't ...  ZERO... (IE:  Return Bool if Data Entry Number > 0)   So, hence what I got below has none of the important keys because they had no values in them...  So, instead of placing the value of the last line in that data area, I'm adding 1 to it when I find a line with something on it, so the < key > will always count as 1 line.

You know when it takes you 2 months to find THAT small of a bug, it's time for a vacation!  Sadly, I'm an I.T., vacations don't exist when you're the one everyone depends on.  Maybe the weather will be nice and I can get a quad out for a flight or two.

GuruSR.
Learned 68k Motorola Asm instruction set in 30 minutes on the way to an Amiga Developer's Forum meeting.
Following week wrote a kernel level memory pool manager in 68k assembler for fun.