Jump to content











Photo
- - - - -

regwrite problem, need hint


  • Please log in to reply
7 replies to this topic

#1 brd.camo

brd.camo

    Newbie

  • Members
  • 11 posts
  •  
    Germany

Posted 23 November 2009 - 07:00 AM

Hi Guys,

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 was_jaclaz

was_jaclaz

    Finder

  • Advanced user
  • 7101 posts
  • Location:Gone in the mist
  •  
    Italy

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 :dubbio:, 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 brd.camo

brd.camo

    Newbie

  • Members
  • 11 posts
  •  
    Germany

Posted 23 November 2009 - 09:33 AM

&#91;HKEY_LOCAL_MACHINE\<your path>&#93;

&#34;UpperFilters&#34;=hex&#40;7&#41;&#58;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&#58;

UpperFilters



Value&#58;

PartMgr

SAFEBOOT

i am only able to set the key to:
Value&#58;

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.

Attached Thumbnails

  • safeboot.jpg


#4 was_jaclaz

was_jaclaz

    Finder

  • Advanced user
  • 7101 posts
  • Location:Gone in the mist
  •  
    Italy

Posted 23 November 2009 - 09:46 AM

I still do not understand. :dubbio:

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&#58;



&#91;code&#93;UpperFilters   REG_MULTI_SZ	 PartMgr SAFEBOOT

if u rightklick it and choose "change" it shows up like this:
Valuename&#58;

UpperFilters



Value&#58;

PartMgr

SAFEBOOT


This is what I DO NOT understand:

i am only able to set the key to:

Value&#58;

PartMgr SAFEBOOT


Set HOW?


If you IMPORT the .REG file isn't the result what you wish? :cheers:

jaclaz

#5 brd.camo

brd.camo

    Newbie

  • Members
  • 11 posts
  •  
    Germany

Posted 23 November 2009 - 10:00 AM

to set in in vistape with the script.
i use regwrite to set keys.

RegWrite,&#34;HKLM&#34;,0x7,&#34;Local_Machine\ControlSet001\Control\Class\{4D36E967-E325-11CE-BFC1-08002BE10318}&#34;,&#34;UpperFilters&#34;,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
does not work, registry key looks like:
UpperFilters REG_MULTI_SZ 50 00 61 ....etc


RegWrite,&#34;HKLM&#34;,0x7,&#34;Local_Machine\ControlSet001\Control\Class\{4D36E967-E325-11CE-BFC1-08002BE10318}&#34;,&#34;UpperFilters&#34;,&#34;50&#34;,&#34;00&#34;,&#34;61&#34;,&#34;00&#34;,&#34;72&#34;,&#34;00&#34;,&#34;74&#34;,&#34;00&#34;,&#34;4d&#34;,&#34;00&#34;,&#34;67&#34;,&#34;00&#34;,&#34;72&#34;,&#34;00&#34;,&#34;00&#34;,&#34;00&#34;,&#34;53&#34;,&#34;00&#34;,&#34;41&#34;,&#34;00&#34;,&#34;46&#34;,&#34;00&#34;,&#34;45&#34;,&#34;00&#34;,&#34;42&#34;,&#34;00&#34;,&#34;4f&#34;,&#34;00&#34;,&#34;4f&#34;,&#34;00&#34;,&#34;54&#34;,&#34;00&#34;,&#34;00&#34;,&#34;00&#34;,&#34;00&#34;,&#34;00&#34;
does not work, registry key looks like:
UpperFilters REG_MULTI_SZ 50 00 61 ....etc


RegWrite,&#34;HKLM&#34;,0x7,&#34;Local_Machine\ControlSet001\Control\Class\{4D36E967-E325-11CE-BFC1-08002BE10318}&#34;,&#34;UpperFilters&#34;,&#34;PartMgr SAFEBOOT&#34;
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 dera

dera

    Gold Member

  • .script developer
  • 1335 posts
  •  
    Hungary

Posted 23 November 2009 - 10:33 AM

what about

RegWrite,"HKLM",0x7, etc... ,"UpperFilters","PartMgr","SAFEBOOT"

#7 was_jaclaz

was_jaclaz

    Finder

  • Advanced user
  • 7101 posts
  • Location:Gone in the mist
  •  
    Italy

Posted 23 November 2009 - 10:50 AM

I see. :cheers:

You are using Winbuilder command "RegWrite".

The syntax could have been more clear:
http://winbuilder.ne...ipt_syntax.html

If you sum this:

RegWrite,<HKEY>,<KeyType>,<Section>,<Keyname>,<Value>

with this:

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:

RegWrite,<HKEY>,<KeyType>,<Section>,<Keyname>,<Value>[,<Value2>] [,...] [,Valuen]

and

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 :dubbio: , 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).

:cheers:

jaclaz

#8 brd.camo

brd.camo

    Newbie

  • Members
  • 11 posts
  •  
    Germany

Posted 23 November 2009 - 11:41 AM

Thanks - this was it!

so easy!




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users