regwrite problem, need hint
#1
Posted 23 November 2009 - 07:00 AM
maybe u can help... i have to set a special regkey for running safeboot in vistape. i tried several ways to set this key the right way - but it doesent set the right way.
in the registry, the key should be:
UpperFilters REG_MULTI_SZ PartMgr SAFEBOOT
but the clue is:
PartMgr SAFEBOOT ist not "PartMgr[Space]SAFEBOOT" it has to be "PartMgr[ENTER]SAFEBOOT" and i cant find a way to include this.
i tried to set it with binary code, but even this does not work for me.
50,00,61,00,72,00,74,00,4d,00,67,00,72,00,00,00,53,00,41,00,46,00,45,00,42,00,4f
,00,54,00,00,00,00,00 would be the binary code needed. if i try this, the reg key looks like this:
UpperFilters REG_MULTI_SZ 50,00,61,00,72,00,74....etc
can someone give me a hint please? this is the last step to get safeboot running. (tried it with modified wim file, this way it already works, but i would like to complete my app script)
thanks in advance,
camo
#2
Posted 23 November 2009 - 09:13 AM
but the clue is:
PartMgr SAFEBOOT ist not "PartMgr[Space]SAFEBOOT" it has to be "PartMgr[ENTER]SAFEBOOT" and i cant find a way to include this.
i tried to set it with binary code, but even this does not work for me.
50,00,61,00,72,00,74,00,4d,00,67,00,72,00,00,00,53,00,41,00,46,00,45,00,42,00,4f
,00,54,00,00,00,00,00 would be the binary code needed. if i try this, the reg key looks like this:
UpperFilters REG_MULTI_SZ 50,00,61,00,72,00,74....etc
I have no idea of what you are talking about , but I can tell you that:
A MULTI_SZ needs to be coded as "hex(7):" in a .REG.
See here:
http://windowsitpro....-reg-files.html
In other words a REG file would be:
Windows Registry Editor Version 5.00
[HKEY_<your hive>\<your path>]
"UpperFilters"=hex(7):50,00,61,00,72,00,74,00,4d,00,67,00,72,00,00,00,53,00,41,\
00,46,00,45,00,42,00,4f,00,54,00,00,00,00,00
Could you actually expand on what the "final goal" is?
jaclaz
#3
Posted 23 November 2009 - 09:33 AM
[HKEY_LOCAL_MACHINE\<your path>] "UpperFilters"=hex(7):50,00,61,00,72,00,74,00,4d,00,67,00,72,00,00,00,53,00,41,\ 00,46,00,45,00,42,00,4f,00,54,00,00,00,00,00
this is exactly what it is, if i export the key from working registry.
but if i open registry, go to this key, and look at it, it shows up like this:
UpperFilters REG_MULTI_SZ PartMgr SAFEBOOT
if u rightklick it and choose "change" it shows up like this:
Valuename: UpperFilters Value: PartMgr SAFEBOOT
i am only able to set the key to:
Value: PartMgr SAFEBOOT
if u look at "binary change" the value between the word PartMgr and the word SAFEBOOT should be 00,00,00 (middle 00 is like enter) -> i only can set 00,20,00 (20 is a space).
i know how to set a key, i know how to set it where i want to, that is not the problem.
i am not able to set the 00 or enter key between PartMgr and SAFEBOOT.
hope this makes it a bit more clear what i want to know. sorry its hard to describe it more specific, i am not a native english speaker.
to be sure i add a screenshot how the key has to be - maybe anyone can tell me how it get this set exactly.
#4
Posted 23 November 2009 - 09:46 AM
This is exactly what happens on MULTI_SZ keys:
but if i open registry, go to this key, and look at it, it shows up like this: [code]UpperFilters REG_MULTI_SZ PartMgr SAFEBOOT
if u rightklick it and choose "change" it shows up like this:Valuename: UpperFilters Value: PartMgr SAFEBOOT
This is what I DO NOT understand:
i am only able to set the key to:
Value: PartMgr SAFEBOOT
Set HOW?
If you IMPORT the .REG file isn't the result what you wish?
jaclaz
#5
Posted 23 November 2009 - 10:00 AM
i use regwrite to set keys.
RegWrite,"HKLM",0x7,"Local_Machine\ControlSet001\Control\Class\{4D36E967-E325-11CE-BFC1-08002BE10318}","UpperFilters",50,00,61,00,72,00,74,00,4d,00,67,00,72,00,00,00,53,00,41,\ 00,46,00,45,00,42,00,4f,00,54,00,00,00,00,00does not work, registry key looks like:
UpperFilters REG_MULTI_SZ 50 00 61 ....etc
RegWrite,"HKLM",0x7,"Local_Machine\ControlSet001\Control\Class\{4D36E967-E325-11CE-BFC1-08002BE10318}","UpperFilters","50","00","61","00","72","00","74","00","4d","00","67","00","72","00","00","00","53","00","41","00","46","00","45","00","42","00","4f","00","4f","00","54","00","00","00","00","00"does not work, registry key looks like:
UpperFilters REG_MULTI_SZ 50 00 61 ....etc
RegWrite,"HKLM",0x7,"Local_Machine\ControlSet001\Control\Class\{4D36E967-E325-11CE-BFC1-08002BE10318}","UpperFilters","PartMgr SAFEBOOT"does not work either, registry key looks like it should, but is wrong if u look binary on it, it is seperated by these 00,20,00 (wich is a space key) should be 00,00,00. (look at screenshot last post)
#6
Posted 23 November 2009 - 10:33 AM
RegWrite,"HKLM",0x7, etc... ,"UpperFilters","PartMgr","SAFEBOOT"
#7
Posted 23 November 2009 - 10:50 AM
You are using Winbuilder command "RegWrite".
The syntax could have been more clear:
http://winbuilder.ne...ipt_syntax.html
If you sum this:
with this:RegWrite,<HKEY>,<KeyType>,<Section>,<Keyname>,<Value>
Valid key type values
- 0x0 - Empty key
- 0x1 - String - writes a text value
- 0x2 - Expanded String - will expand any variable value contained inside %%. (e.g. %temp%)
- 0x3 - Binary data - adds data in binary format. Each byte is specified by groups of two digits splitting each value with commas
- 0x4 - Dword - writes a numeric value
- 0x7 - Writes multiple NULL separated strings
You get:
andRegWrite,<HKEY>,<KeyType>,<Section>,<Keyname>,<Value>[,<Value2>] [,...] [,Valuen]
Valid key type values
- 0x0 - Empty key
- 0x1 - String - writes a text value
- 0x2 - Expanded String - will expand any variable value contained inside %%. (e.g. %temp%)
- 0x3 - Binary data - adds data in binary format. Each byte is specified by groups of two digits splitting each value with commas
- 0x4 - Dword - writes a numeric value
- 0x7 - Writes multiple NULL separated strings. Each string is separated by commas.
Which is what dera suggested , but you are right, it is not intuitive.
The item is better represented in the .chm help file paraglider was so kind to create:
http://www.paraglide.../winbuilder.chm
but only in the Reg_Add (Common API function).
jaclaz
#8
Posted 23 November 2009 - 11:41 AM
so easy!
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users