> I then open this file using the system object, strip out
> any characters of Ascii value < 32, so that what remains
> is simple text.

Just as an addendum, here's a couple of excerpts from the 'cleaned' file:

 

{HKEY_CURRENT_USER\Control Panel\PowerCfg\PowerPolicies\3}
"Name"="Always On"
have network wakeup hardware."
"Policies"=hex:01,00,00,00,02,00,00,00,01,00,00,00,00,00,00,00,02,00,00,00,00,\
  00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,32,32,00,00,04,00,00,00,04,00,\
  00,00,00,00,00,00,00,00,00,00,b0,04,00,00,84,03,00,00,00,00,00,00,08,07,00,\
  00,00,01,64,64,64,64,00,00

{HKEY_CURRENT_USER\Control Panel\PowerCfg\PowerPolicies\4}
"Name"="Minimal Power Management"
"Description"="This scheme keeps the computer on and optimizes it for high 
performance."
"Policies"=hex:01,00,00,00,02,00,00,00,01,00,00,00,00,00,00,00,02,00,00,00,00,\
  00,00,00,00,00,00,00,00,00,00,00,2c,01,00,00,32,32,03,03,04,00,00,00,04,00,\
  00,00,00,00,00,00,00,00,00,00,84,03,00,00,2c,01,00,00,00,00,00,00,84,03,00,\
  00,00,01,64,64,64,64,00,00

(Square brackets changed to squiggly so it doesn't think I'm posting HTML)
 

As you can see, the third line in the first chunk has been truncated. The same 
line in the second chunk is fine. Yet I can't see any quantitive differences 
between these two lines in the source file. It's strange.

 

Colin


----- Original Message -----
From: "Shawn K. Hall" <[EMAIL PROTECTED]>
To: [email protected]
Subject: RE: [vbhelp] Strange problem cleaning a regedit export file
Date: Tue, 8 Feb 2005 05:33:06 -0800

> 
> Hi Colin,
> 
> > I wonder if somebody can make sense of this rather baffling 
> > problem I've encountered.
> 
> The obvious question is, "can you show us your code?" I'm guessing
> this is related to a character-width or a variable length problem.
> Depending on the actual stripping method this could also be a result
> of out-of-memory problems.
> 
> 
> > The output has extra bytes, presumably used for some arcane
> > windows purpose, e.g.:
> >     "fig1.jpg"
> 
> Attachments are not allowed through to the list, so if you attached
> something for reference I recommend you either post it in the files
> area or to your own website, if possible.
> 
> 
> > I then open this file using the system object, strip out any 
> > characters of Ascii value < 32, so that what remains is simple 
> > text.
> 
> Be careful with Ascii 9 - it's a tab, and is used by some string
> variables and within certain wrapping values. Sometimes a null
> character (ascii 0) will also screw up the textstream object if it's
> between spaces. TextStream views this as an EOL and will choke.
> 
> 
> > If anybody has any idea where to start looking for a cause I'd be 
> > extremely greatful.
> 
> Lastly, I'll ask plainly - what the heck are you thinking? You can't
> *really* need all that information from the entire hive, can you?
> Can't you enumerate certain hives or an array of branches and their
> children? I can't conceive of anyone - even MS - needing access to
> the entire HKCU hive.
> 
> For neat samples on registry enumeration look at the mRA_Startup
> sample here:
>    http://ReliableAnswers.com/VB/Samples.asp#mRA
> It enumerates certain patterns within the HKCR hive to build a
> validated dependency/references listing for your VB projects. It
> uses the (mostly) logical structure to track the correct children,
> too, so as to find only the information it actually needs.
> 
> Regards,
> 
> Shawn K. Hall
> http://12PointDesign.com/
> http://ReliableAnswers.com/
> 
> '// ========================================================
> I mean if we only had a wheelbarrow, that would be something
>       -- 'Westley', The Princess Bride

-- 
___________________________________________________________
Sign-up for Ads Free at Mail.com
http://promo.mail.com/adsfreejump.htm







'// =======================================================
    Rules : http://ReliableAnswers.com/List/Rules.asp
    Home  : http://groups.yahoo.com/group/vbHelp/
    =======================================================
    Post  : [email protected]
    Join  : [EMAIL PROTECTED]
    Leave : [EMAIL PROTECTED]
'// =======================================================
 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/vbhelp/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 



Reply via email to