Hi Michael,
This is a tough problem - especially if you have a huge list of registry
keys. The only solution thus far is to temporarily manually edit your .REG
file, import the file into a SLD file, and then manually modify that file
with Notepad to remove the temporary edits from the SLD file. Here's a
walkthrough on how to do this.
Step one is to modify your .REG file with some temporary edits so that all
of these changes are traceable and revert able. I'd suggest to copy off all
files before manually modifying them to ensure that if something goes awry
that you have a backup of the base file. Open your .REG file and replace
all instances of a single space with "((BAD_SPACE_VALUE))" [Without the
quotes]. Below are some test registry keys that show that this operation is
*GENERALLY* safe; however, please always keep track of what has changed with
a differencing application such as Beyond Compare from Scooter Software.
(
http://scootersoftware.com/)
********Inside .REG File**********
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\test 1]
[HKEY_LOCAL_MACHINE\SOFTWARE\test 1\test 2]
"te st 4"="qw3r aser3 3rawer"
"test 5"=hex:32,14,23,ad,f2,3a,e2,3a,e0
"test 6"=dword:21341234
"test
7"=hex(7):31,00,32,00,33,00,34,00,35,00,36,00,00,00,31,00,32,00,33,00,34,\
00,35,00,36,00,20,00,37,00,38,00,39,00,30,00,00,00,00,00
"test
8"=hex(2):32,00,33,00,72,00,20,00,25,00,31,00,30,00,25,00,5c,00,77,00,69,\
00,6e,00,64,00,6f,00,77,00,73,00,00,00
******************************
Translates to the following inside of the registry
********Inside of Registry*********
HKLM\Software\Test 1\Test 2\
test 4 : REG_SZ : qw3r aser3 3rawer
test 5 : REG_BINARY : "32 14 23 AD F2 3A E2 3A E0"
test 6 : REG_DWORD : 21341234(h) or 557060660(d)
test 7 : REG_MULTI_SZ : 123456
123456 7890
test 8 : REG_EXPAND_SZ : 23r %10%\windows
******************************
As should be evident is that doing the replace all for the single space
entries is *RELATIVELY* safe; however, one should *DEFINATELY* double check
to ensure that the keys are still ok after the fact.
So - now that you have this portion done the second step is to import the
.REG file into Component Designer and save off the resulting SLD file. Turn
around and copy the SLD file into another file to back up the SLD in case
something bad happens. The third step is to open that SLD file in Notepad
and replace all instances of "((BAD_SPACE_VALUE))" [Without Quotes] with a
single space. The final step is to verify the results on a couple items
then save off the SLD file. Re-open the modified SLD file with Component
Designer and verify that your registry keys are how they should be and not
malformed, contain the "((BAD_SPACE_VALUE))" string, or any other weirdness.
If this checks out ok then you should be good to go.
Hope this helps.