Jump to content











Photo
- - - - -

[Closed by author] RegRead bug or not bug


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

#1 olegpov

olegpov

    Frequent Member

  • .script developer
  • 309 posts
  • Location:Orel
  • Interests:BSD systems

Posted 03 March 2010 - 09:27 PM

@psc, @Nuno Brito

Set,%UpperFilters%,PartMgr

RegHiveLoad,WB-setup,%target_sys%\setupreg.hiv

System,ERROROFF

RegRead,HKLM,WB-Setup\ControlSet001\Control\Class\{71A27CDD-812A-11D0-BEC7-08002BE2092F},UpperFilters,%UpperFilters%

RegHiveUnLoad,WB-setup

Please the answer that should be in value of variable ,%UpperFilters% if subkey UpperFilters is absent or is equal " "
I think logically that should be equal " " or I am not right?
In WB80.0.3.0 it is equal PartMgr - It is correct or not?

#2 paraglider

paraglider

    Gold Member

  • .script developer
  • 1729 posts
  • Location:NC,USA
  •  
    United States

Posted 04 March 2010 - 01:50 AM

According to docs RegRead does not support reading of 0x7 registry values. UpperFilters is of type 0x7 - REG_MULTI_SZ.

#3 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 04 March 2010 - 03:15 AM

Hi olegpov,

since you particularly pointed psc and Nuno, i did decide not to reply.

But psc is away, Nuno did not reply, and you are my dear friend, assuming you do not have a particular reason to point Nuno and psc (if you do sorry) here an answer:

clear 0x7 handling was one of the boxing we runed with psc on wb080 development. (and we are both happy with the result)
psc decide to add some functions for 0x7 handling which i believe will serve your (and most) tasks.

one of them, I guess will be useful for your goal:
If,EXISTREGMULTI,HKLM,Section,Key,SubVal,Command
check post 36

also we now have RegAddMulti,
check post 22

both also exists in wand.

besides check basic usage at post 13

outoftopic: you can use wb080rev3 with LiveXP :exclamation: , last 77rc2 package already packed and will be uploaded later to remember good times :exclamation:.

:cheers:

#4 olegpov

olegpov

    Frequent Member

  • .script developer
  • 309 posts
  • Location:Orel
  • Interests:BSD systems

Posted 04 March 2010 - 05:18 AM

@Lancelot
You probably have not absolutely understood my question (my bad English :exclamation: )
At me a question about logic of behaviour WB
If I use a command: System, ERROROFF I initially know that that the error of run of a following command : RegRead, HKLM, WB-Setup \ControlSet001 \Control \Class \ {71A27CDD-812A-11D0-BEC7-08002BE2092F}, UpperFilters, %UpperFilters % is possible
But at run RegRead, HKLM, WB-Setup \ControlSet001 \Control \Class \ {71A27CDD-812A-11D0-BEC7-08002BE2092F}, UpperFilters, %UpperFilters %
WB077rc2 Changes %UpperFilters %
even if a error (in a variable enters " ")
WB80rv3 Changes value of a variable only if the command is carried out without a error
Then a logical question for what function System, ERROROFF is necessary????
For that what simply to not react to errors???

#5 paraglider

paraglider

    Gold Member

  • .script developer
  • 1729 posts
  • Location:NC,USA
  •  
    United States

Posted 04 March 2010 - 01:23 PM

Seems to me wb80 is correct. It was bad for previous versions to update the output variable if the call failed.

System,ERROROFF stops wb reporting the error as an error and potentially aborting the build.

#6 dera

dera

    Gold Member

  • .script developer
  • 1335 posts
  •  
    Hungary

Posted 04 March 2010 - 06:14 PM

Then a logical question for what function System, ERROROFF is necessary

maybe i cannot exactly understand your question too
but i think it was necessary to prevent to 'Halt' the build


e.g.
in WB interface in Tools > Options > 'Stop Build on Error' checked on
when the script command returned with error
(for example querying a non existing registry key - see here)
the whole build was halted

the above linked example was a problem in the old VistaPE project
where theoretically it was possible to build the project without installed AIK,
but practically it was not possible:
if AIK was not installed then the script intended to install the tool: WimUtil using the command 'WimUtil.exe install',
the script wanted to decide whether is it needed to instal WimUtil by querying the registry key: 'Services\WimFltr'
but as the 'WimFltr' reg key doesnt exist if AIK is not installed or WimUtil is not instelled yet
the build halted before launched the command 'WimUtil.exe install'

#7 olegpov

olegpov

    Frequent Member

  • .script developer
  • 309 posts
  • Location:Orel
  • Interests:BSD systems

Posted 04 March 2010 - 06:55 PM

@All
Thanks for answers. :whistling:
Now logic of behaviour of commands: System, ERROROFF and RegRead in WB80 to me it became clear
Now will have to check variables after performance of such blocks of a code as in my first post
I suspect it topic it is possible to close.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users