[tool] reg2WBS
#251
Posted 03 February 2010 - 06:45 PM
But I hope that independent from the theme, in the new 3.2.5 the main window will never have a scrollbar again.
Peter
#252
Posted 05 February 2010 - 03:20 PM
fixed the bug with multiple values under the same key disappearing.
added to suppress output of 0x0 keys
added output of "UserProfile" under "Environment" option
in case of more than one hive, API check code is only written once
Peter
#253
Posted 05 February 2010 - 06:17 PM
Hi Peter,Version 3.3.0 is uploaded.
fixed the bug with multiple values under the same key disappearing.
added to suppress output of 0x0 keys
added output of "UserProfile" under "Environment" option
in case of more than one hive, API check code is only written once
Peter
i just tested it for the first drive test it's working great, but actually the start key of duplicated keys is disappear. Example:
Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE\SOFTWARE\TEST\] [HKEY_LOCAL_MACHINE\SOFTWARE\TEST\MORE\] [HKEY_LOCAL_MACHINE\SOFTWARE\TEST\MORE\FIRSTDISSAPPEARS] [HKEY_LOCAL_MACHINE\SOFTWARE\TEST\MORE\FIRSTDISSAPPEARS] "exampleValue1"="value01" [HKEY_LOCAL_MACHINE\SOFTWARE\TEST\MORE\FIRSTDISSAPPEARS] "exampleValue2"="value02" [HKEY_LOCAL_MACHINE\SOFTWARE\TEST\MORE\FIRSTDISSAPPEARS] "exampleValue3"="value03"output:
Hive_Load,Machine reg_add,0x0,%reg%\TEST\ reg_add,0x0,%reg%\TEST\MORE\ reg_add,0x1,%reg%\TEST\MORE\FIRSTDISSAPPEARS,exampleValue1,value01 reg_add,0x1,%reg%\TEST\MORE\FIRSTDISSAPPEARS,exampleValue2,value02 reg_add,0x1,%reg%\TEST\MORE\FIRSTDISSAPPEARS,exampleValue3,value03 Hive_Unload,MachineI think it's one missing:
"reg_add,0x0,%reg%\TEST\MORE\FIRSTDISSAPPEARS\"However i think and learn from the 0x0 dump option(DO NOT WRITE 0x0 keys) that these 0x0 doesn't have benefits because later these keys are filled with values and exist with the key, did i understand it right?
m4dm4Xz
#254
Posted 05 February 2010 - 06:32 PM
Thanks for testing.Hi Peter,
i just tested it for the first drive test it's working great, but actually the start key of duplicated keys is disappear. Example:
I think it's one missing:"reg_add,0x0,%reg%\TEST\MORE\FIRSTDISSAPPEARS\"However i think and learn from the 0x0 dump option(DO NOT WRITE 0x0 keys) that these 0x0 doesn't have benefits because later these keys are filled with values and exist with the key, did i understand it right?
When you check the result of Reg2WBS output, you should not compare the lines literally.
Execute the generated script lines, and compare the generated result in registry.
It is right that the mentioned key 'disappears', but when you execute the 'next' line from script, it is automatically inserted.
Same with your second question, which you understood right:
Usually it should not matter to omit the empty keys.
When any subkey is written, WinBuilder should write the parent key(s) automatically.
Look at the bold written Usually: Maybe there are situations where WinBuilder does not (yet) understand the sence, and would write wrong registry entries or fail with 'Missing Key'.
Therefore I do not supress the 0x0 output automatically / generally, but give the user a choice to write, if necessary.
You have to keep in mind, that the Stupid WinBuilder Developer (that's mainly me!) never will be able to publish a 110% Error Free Version!
Peter
#255
Posted 05 February 2010 - 06:41 PM
You have to keep in mind, that the Stupid WinBuilder Developer (that's mainly me!) never will be able to publish a 110% Error Free Version!
No prob, a 100% one would suffice.
Wonko
#256
Posted 05 February 2010 - 06:53 PM
cheer good work up
m4dm4Xz
#257
Posted 05 February 2010 - 07:19 PM
on some verrry rare cases, empty keys (0x0) should not be deleted.
"Do not write 0x0 keys" options is very dangerous (it may cause less hair when trying to find out what went wrong on these rare cases)
but having 0x0 everywhere cause redundancy too.
Perfect reg2wbs solution about 0x0 should be......, giving 2 examples,
Example1:
reg2wbs (as default) should convert following
toREGEDIT4
[HKEY_CURRENT_USER\Software\PSC]
[HKEY_CURRENT_USER\Software\PSC\PSC_EX]
[HKEY_CURRENT_USER\Software\PSC\PSC_EX\Install]
[HKEY_CURRENT_USER\Software\PSC\PSC_EX\Install]
"Path"="C:\\Program Files\\PSC_EX"
Hive_Load,Default
reg_add,0x2,"%reg%\Software\PSC\PSC_EX\Install",Path,C:\Program#$sFiles\PSC_EX
Hive_Unload,Default
Example2:
reg2wbs (as default) should convert following
REGEDIT4
[HKEY_CURRENT_USER\Software\PSC]
[HKEY_CURRENT_USER\Software\PSC\PSC_EX]
[HKEY_CURRENT_USER\Software\PSC\PSC_EX\Install]
[HKEY_CURRENT_USER\Software\PSC\PSC_EX\Install]
"Path"="C:\\Program Files\\PSC_EX"
[HKEY_CURRENT_USER\Software\PSC\PSC_EX\HEYOOOOOOOOOO]
to
Hive_Load,Default
reg_add,0x2,"%reg%\Software\PSC\PSC_EX\Install",Path,C:\Program#$sFiles\PSC_EX
reg_add,0x0,"%reg%\Software\PSC\PSC_EX\HEYOOOOOOOOOO"
Hive_Unload,Default
This would result NO redundancy with regadd 0x0 when default reg2wbs options used without breaking anything.
I hope understood (If not call me )
**
also
I guess this line
reg_add,0x2,"%reg%\Software\ES-Computing\EditPlus 3\Install",Path,#$pSystemDrive#$p\Program#$sFiles\EditPlus#$s3
should be
reg_add,0x2,"%reg%\Software\ES-Computing\EditPlus 3\Install",Path,%PE_Programs%\EditPlus#$s3
when "Output API Style" selected with "Replace Environment strings"
or does reg2wbs do not support multi language or/and multi PEenvironment source ?
or maybe I miss something
Edit:
"reg2wbs (as default)" is only to give example about 0x0,
I believe "as default", giving example, better to have following line
reg_add,0x2,"%reg%\Software\ES-Computing\EditPlus 3\Install",Path,%PE_Programs%\EditPlus#$s3
well it is not much important to me, just a comment
#258
Posted 05 February 2010 - 07:24 PM
#259
Posted 05 February 2010 - 07:53 PM
thank's for explaining i could understand about the 0x0 regs more, and if it's possible to give me a little example from very rare case (cases that makes trouble with deleting 0x0), so can i know about these rare case too.
m4dm4Xz
#260
Posted 05 February 2010 - 08:04 PM
If I remember right, CWShredder needed an empty key to check if it was installed beforeand if it's possible to give me a little example from very rare case (cases that makes trouble with deleting 0x0), so can i know about these rare case too.
reg_add,0x0,"%reg%\TrendMicro\CWShredder"
Further:
I tend to delete 0x0 lines by manually checking as shown above (only reason, I do not like having them, they do NOT harm) and now requested if reg2wbs can do that too (nothing critical), besides this has no importance for you, if you leave the conversion untouched with some extra 0x0 lines, it will not hurt you
#261
Posted 05 February 2010 - 08:43 PM
m4dm4Xz
#262
Posted 05 February 2010 - 08:56 PM
#263
Posted 05 February 2010 - 09:08 PM
Just to avoid confusion, There are no duplicate keys on my example, and reg2WBS do not produce douplicate keys.Aha, i think i will cut duplicate keys manually if keys exist with value, like your previous example.
On my previous example (1)
reg2wbs should currently create something like this:
Hive_Load,Default
reg_add,0x0,%reg%\Software\PSC
reg_add,0x0,%reg%\Software\PSC\PSC_EX
reg_add,0x0,%reg%\Software\PSC\PSC_EX\Install
reg_add,0x1,%reg%\Software\PSC\PSC_EX\Install,Path,C:\Program#$sFiles\PSC_EX
Hive_Unload,Default
this is exactly what you do when you use registry editor manually (regedit)
step1) you first create a Key with name PSC,
step2) you create a Key with name PSC_EX ,
step3) than you create a key with Install,
step4) than you create a string value with "value name" Path and value data "C:\Program Files\PSC_EX"
no duplicate things around with reg2wbs conversion, but there is unneccary (redundant) lines since using one line
Hive_Load,Default
reg_add,0x1,%reg%\Software\PSC\PSC_EX\Install,Path,C:\Program#$sFiles\PSC_EX
Hive_Unload,Default
also does things with step1 2 3
edit:
A tip:
if you open your regedit, go to
HKEY_CURRENT_USER\Software\ES-Computing\EditPlus 3\Install
export to a reg file, and use reg2wbs to convert, you will not get unneccary 0x0 lines .
I guess time to practice for you, May I suggest you to check some basic apps scripts which are already exists on LiveXP,
some examples for most basic scripting without reg addings: Eraser, Restoration, SelfImage
and some examples for basic scripting with reg addings, Smart Partition Recovery, SumatraPDF
If you check them for a while (with the experiences you get these days) many things will get more clear in your mind .
#264
Posted 06 February 2010 - 05:10 PM
Following Lancelot's suggestion I changed (not only text, also logic)
'Do not write 0x0 keys'
to
'Do not write redundant 0x0 keys'
In addition, you have a third 'Show' option: "Command Line"
Here, after the build, you can see the command line which is passed to Reg2WBSPrg.exe.
That may be helpful when in a script you want to use Reg2WBSPrg.exe, or when in an editor like Textpad4, you want to define an "Extra".
BTW: My Textpad4 converts an On-Screen reg file on click to a WB Script snippet:
Peter
#265
Posted 06 February 2010 - 06:08 PM
Version 3.3.1 on server.
Following Lancelot's suggestion I changed (not only text, also logic)
'Do not write 0x0 keys'
to
'Do not write redundant 0x0 keys'
...
Peter
Great work, let's get some test(s) and i like about "not only text, also logic" too.
Thank you, Peter.
m4dm4Xz
#266
Posted 06 February 2010 - 06:39 PM
Cannot create file "". The system cannot find the path specified.
and this happen after version 3.2.5 (i have tried 3.25, 3.30, 3.3.1 and in 3.2.5 no errors), i'm didn't report this before because i think it's not harm and not a big problem but now for sure i report it. Hope that you not angry that i post bug about your program.
Thank you, for this great tool.
m4dm4Xz
#267
Posted 06 February 2010 - 06:44 PM
Within 5 (Latin) minutes you can download version 3.3.2.
Thanks, m4dm4Xz!
You are a good 'Bug-Hunter'
Peter
#268
Posted 06 February 2010 - 06:55 PM
OH, good thank you.That is a real bug, unknown until now (I think because right now nobody before wanted to save and then 'cancelled').
Within 5 (Latin) minutes you can download version 3.3.2.
Noooooo, i don't like to eat bugs but thank you for ask. (i don't like cockroach; they can fly and bite my mouth in the night, actually i'm sleep at morning)You are a good 'Bug-Hunter'
Peter
m4dm4Xz
#269
Posted 06 February 2010 - 06:55 PM
Done!Within 5 (Latin) minutes you can download version 3.3.2.
Peter
#270
Posted 13 February 2010 - 02:20 PM
Here is the option to write output for the new RegWriteBin command, introduced with (upcoming Monday) WinBuilder 080.
When outputting not 'native' but API format code, in this case reg_add_bin is written rather than reg_add.
The api has to be adapted to use this new functionality and call RegWriteBin.
Peter
#271
Posted 14 February 2010 - 03:32 AM
new option must not be default selected if you do not want unnecassary (and unreadible) RegWriteBin hex entries everywhere in scripts.Here is the option to write output for the new RegWriteBin command
But it will be great if it is possible to have a default selected option saying "HEX WideStrings Auto for Unicode" (or something like that...)
#272
Posted 14 February 2010 - 09:56 AM
Version 3.4.1 uploadednew option must not be default selected if you do not want unnecassary (and unreadible) RegWriteBin hex entries everywhere in scripts.
I'm working on version 4.0.0 with FULL Unicode functionality.But it will be great if it is possible to have a default selected option saying "HEX WideStrings Auto for Unicode" (or something like that...)
Currently the *.reg is converted to ASCII.
The new version will have everything as WideString.
Peter
#273
Posted 18 February 2010 - 05:25 AM
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Software\0TEST]
"PSC"=""
[HKEY_CURRENT_USER\Software\0TEST\Emptykey1]
[HKEY_CURRENT_USER\Software\0TEST\Emptykey2]
[HKEY_CURRENT_USER\Software\0TEST\Emptykey3]
when "Do not write redundant 0x0 keys" enabled, reg2wbs converts to
RegHiveLoad,WB-Default,%target_sys%\config\default
RegWrite,HKLM,0x1,WB-Default\Software\0TEST,PSC,
RegWrite,HKLM,0x0,WB-Default\Software\0TEST\Emptykey1
RegWrite,HKLM,0x0,WB-Default\Software\0TEST\Emptykey2
RegHiveUnLoad,WB-Default
forgets Emptykey3
reg2WBSprg.exe -f:"D:\Documents and Settings\Administrator\Desktop\t547.reg" -O:C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\reg2wbs.tmp -H -0
#274
Posted 18 February 2010 - 01:46 PM
Version 3.4.2 uploaded.
Peter
#275
Posted 18 February 2010 - 02:57 PM
another small bugy,
following
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Software\0TEST\Emptykey1]
converted to
RegWrite,HKLM,0x0,WB-Default\Software\0TEST\Emptykey1
it should be
RegWrite,HKLM,0x1,WB-Default\Software\0TEST\Emptykey1
ps: Thanks for confirmation, I got a mixed mind about this empty key, but now all cleared
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users