Jump to content











Photo
* * * * * 2 votes

[tool] reg2WBS


  • This topic is locked This topic is locked
324 replies to this topic

#251 pscEx

pscEx

    Platinum Member

  • Team Reboot
  • 12707 posts
  • Location:Korschenbroich, Germany
  • Interests:What somebody else cannot do.
  •  
    European Union

Posted 03 February 2010 - 06:45 PM

It is intended that the width is restricted (to avoid other users to complain 'grey space in the right')

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 pscEx

pscEx

    Platinum Member

  • Team Reboot
  • 12707 posts
  • Location:Korschenbroich, Germany
  • Interests:What somebody else cannot do.
  •  
    European Union

Posted 05 February 2010 - 03:20 PM

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

#253 m4dm4Xz

m4dm4Xz

    Member

  • Members
  • 76 posts
  • Location:Bangkok
  • Interests:LiveXP only enough
  •  
    Thailand

Posted 05 February 2010 - 06:17 PM

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

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:
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,Machine
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?

m4dm4Xz

#254 pscEx

pscEx

    Platinum Member

  • Team Reboot
  • 12707 posts
  • Location:Korschenbroich, Germany
  • Interests:What somebody else cannot do.
  •  
    European Union

Posted 05 February 2010 - 06:32 PM

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?

Thanks for testing.

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 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 16066 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

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 m4dm4Xz

m4dm4Xz

    Member

  • Members
  • 76 posts
  • Location:Bangkok
  • Interests:LiveXP only enough
  •  
    Thailand

Posted 05 February 2010 - 06:53 PM

Ah, thank you for explaining and nothing is perfect, i never forget these. But for problems i'm here to helping and solving (and asking :P ). :P

cheer good work up :cheers:

m4dm4Xz

#257 Lancelot

Lancelot

    Frequent Member

  • .script developer
  • 5013 posts
  • Location:Turkiye/Izmir
  • Interests:*Mechanical stuff and Physics,
    *LiveXP, BartPE, SherpyaXPE,
    *Basketball and Looong Walking,
    *Buying outwear for my girlf (Reason: Girls are stupid about buying bad stuff to make themselves uglier :))
    *Girls (Lyric: Girl,...., You will be a womann, Soon)
    *Answering questions for "Meaning of life",
    *Helping people,

    Kung with LiveXP, Fu with Peter :)
  •  
    Turkey

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

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"

to

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. :cheers:

I hope understood (If not call me :P)




**
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 :P


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 :cheers:

#258 MedEvil

MedEvil

    Platinum Member

  • .script developer
  • 7771 posts

Posted 05 February 2010 - 07:24 PM

Peter, just for your information, there exist settings in the registry which consist of nothing but a key with a specific name.

:P

#259 m4dm4Xz

m4dm4Xz

    Member

  • Members
  • 76 posts
  • Location:Bangkok
  • Interests:LiveXP only enough
  •  
    Thailand

Posted 05 February 2010 - 07:53 PM

Hi Lancelot,
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.

:P

m4dm4Xz

#260 Lancelot

Lancelot

    Frequent Member

  • .script developer
  • 5013 posts
  • Location:Turkiye/Izmir
  • Interests:*Mechanical stuff and Physics,
    *LiveXP, BartPE, SherpyaXPE,
    *Basketball and Looong Walking,
    *Buying outwear for my girlf (Reason: Girls are stupid about buying bad stuff to make themselves uglier :))
    *Girls (Lyric: Girl,...., You will be a womann, Soon)
    *Answering questions for "Meaning of life",
    *Helping people,

    Kung with LiveXP, Fu with Peter :)
  •  
    Turkey

Posted 05 February 2010 - 08:04 PM

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.

If I remember right, CWShredder needed an empty key to check if it was installed before
reg_add,0x0,"%reg%\TrendMicro\CWShredder"

long time ago, I saw Max Real Qnx requested for 0x0 writability too (check here) (I do not know the reason) Edit: wrong example, it is something different but slightly releated :P.

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 :P

#261 m4dm4Xz

m4dm4Xz

    Member

  • Members
  • 76 posts
  • Location:Bangkok
  • Interests:LiveXP only enough
  •  
    Thailand

Posted 05 February 2010 - 08:43 PM

Aha, i think i will cut duplicate keys manually if keys exist with value, like your previous example. :P

:P

m4dm4Xz

#262 MedEvil

MedEvil

    Platinum Member

  • .script developer
  • 7771 posts

Posted 05 February 2010 - 08:56 PM

The classic example for this would be HKLM\system\setup\allowstart\SomeSubkey.

:P

#263 Lancelot

Lancelot

    Frequent Member

  • .script developer
  • 5013 posts
  • Location:Turkiye/Izmir
  • Interests:*Mechanical stuff and Physics,
    *LiveXP, BartPE, SherpyaXPE,
    *Basketball and Looong Walking,
    *Buying outwear for my girlf (Reason: Girls are stupid about buying bad stuff to make themselves uglier :))
    *Girls (Lyric: Girl,...., You will be a womann, Soon)
    *Answering questions for "Meaning of life",
    *Helping people,

    Kung with LiveXP, Fu with Peter :)
  •  
    Turkey

Posted 05 February 2010 - 09:08 PM

Aha, i think i will cut duplicate keys manually if keys exist with value, like your previous example. :P

Just to avoid confusion, There are no duplicate keys on my example, and reg2WBS do not produce douplicate keys.

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 :cheers:

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 :cheers:.


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 :P.
:cheers:

#264 pscEx

pscEx

    Platinum Member

  • Team Reboot
  • 12707 posts
  • Location:Korschenbroich, Germany
  • Interests:What somebody else cannot do.
  •  
    European Union

Posted 06 February 2010 - 05:10 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'

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:
textpad.gif

Peter

#265 m4dm4Xz

m4dm4Xz

    Member

  • Members
  • 76 posts
  • Location:Bangkok
  • Interests:LiveXP only enough
  •  
    Thailand

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. :cheers:

:cheers:

m4dm4Xz

#266 m4dm4Xz

m4dm4Xz

    Member

  • Members
  • 76 posts
  • Location:Bangkok
  • Interests:LiveXP only enough
  •  
    Thailand

Posted 06 February 2010 - 06:39 PM

Hmm, i really don't know whether this is a bug; let's me explain after i builded a script with reg2wbs and choose to save but CANCEL to save an error appear. It say's :

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.

Posted Image

Thank you, for this great tool.

m4dm4Xz

#267 pscEx

pscEx

    Platinum Member

  • Team Reboot
  • 12707 posts
  • Location:Korschenbroich, Germany
  • Interests:What somebody else cannot do.
  •  
    European Union

Posted 06 February 2010 - 06:44 PM

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.

Thanks, m4dm4Xz!

You are a good 'Bug-Hunter'

Peter


#268 m4dm4Xz

m4dm4Xz

    Member

  • Members
  • 76 posts
  • Location:Bangkok
  • Interests:LiveXP only enough
  •  
    Thailand

Posted 06 February 2010 - 06:55 PM

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.

OH, good thank you. :cheers:

You are a good 'Bug-Hunter'

Peter

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)

m4dm4Xz

#269 pscEx

pscEx

    Platinum Member

  • Team Reboot
  • 12707 posts
  • Location:Korschenbroich, Germany
  • Interests:What somebody else cannot do.
  •  
    European Union

Posted 06 February 2010 - 06:55 PM

Within 5 (Latin) minutes you can download version 3.3.2.

Done!

Peter

#270 pscEx

pscEx

    Platinum Member

  • Team Reboot
  • 12707 posts
  • Location:Korschenbroich, Germany
  • Interests:What somebody else cannot do.
  •  
    European Union

Posted 13 February 2010 - 02:20 PM

Version 3.4.0 uploaded.

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 Lancelot

Lancelot

    Frequent Member

  • .script developer
  • 5013 posts
  • Location:Turkiye/Izmir
  • Interests:*Mechanical stuff and Physics,
    *LiveXP, BartPE, SherpyaXPE,
    *Basketball and Looong Walking,
    *Buying outwear for my girlf (Reason: Girls are stupid about buying bad stuff to make themselves uglier :))
    *Girls (Lyric: Girl,...., You will be a womann, Soon)
    *Answering questions for "Meaning of life",
    *Helping people,

    Kung with LiveXP, Fu with Peter :)
  •  
    Turkey

Posted 14 February 2010 - 03:32 AM

Hi psc,

Here is the option to write output for the new RegWriteBin command

new option must not be default selected if you do not want unnecassary (and unreadible) RegWriteBin hex entries everywhere in scripts.

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 pscEx

pscEx

    Platinum Member

  • Team Reboot
  • 12707 posts
  • Location:Korschenbroich, Germany
  • Interests:What somebody else cannot do.
  •  
    European Union

Posted 14 February 2010 - 09:56 AM

new option must not be default selected if you do not want unnecassary (and unreadible) RegWriteBin hex entries everywhere in scripts.

Version 3.4.1 uploaded

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...) ;)

I'm working on version 4.0.0 with FULL Unicode functionality.
Currently the *.reg is converted to ASCII.
The new version will have everything as WideString.

Peter

#273 Lancelot

Lancelot

    Frequent Member

  • .script developer
  • 5013 posts
  • Location:Turkiye/Izmir
  • Interests:*Mechanical stuff and Physics,
    *LiveXP, BartPE, SherpyaXPE,
    *Basketball and Looong Walking,
    *Buying outwear for my girlf (Reason: Girls are stupid about buying bad stuff to make themselves uglier :))
    *Girls (Lyric: Girl,...., You will be a womann, Soon)
    *Answering questions for "Meaning of life",
    *Helping people,

    Kung with LiveXP, Fu with Peter :)
  •  
    Turkey

Posted 18 February 2010 - 05:25 AM

bugy

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

:smiling9:

#274 pscEx

pscEx

    Platinum Member

  • Team Reboot
  • 12707 posts
  • Location:Korschenbroich, Germany
  • Interests:What somebody else cannot do.
  •  
    European Union

Posted 18 February 2010 - 01:46 PM

Thanks Lancelot!

Version 3.4.2 uploaded.


Peter

#275 Lancelot

Lancelot

    Frequent Member

  • .script developer
  • 5013 posts
  • Location:Turkiye/Izmir
  • Interests:*Mechanical stuff and Physics,
    *LiveXP, BartPE, SherpyaXPE,
    *Basketball and Looong Walking,
    *Buying outwear for my girlf (Reason: Girls are stupid about buying bad stuff to make themselves uglier :))
    *Girls (Lyric: Girl,...., You will be a womann, Soon)
    *Answering questions for "Meaning of life",
    *Helping people,

    Kung with LiveXP, Fu with Peter :)
  •  
    Turkey

Posted 18 February 2010 - 02:57 PM

Hi psc,

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 :smiling9:




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users