Jump to content











Photo
* * * * * 1 votes

Voodoo hunting


  • Please log in to reply
3 replies to this topic

#1 pscEx

pscEx

    Platinum Member

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

Posted 24 June 2009 - 04:27 PM

In the past we several times have had the situation:
The project runs very well, but if I include the xyz script, the PE does not work correctly any more.

Voodoo?
NO! Here propably the additional script overwrote some files / registry content which is used in the PE by different script items to run well.

WinBuilder 077 RC 2 will publish most of such overwrites and possible 'Voodoo creators'.

This WinBuilder feature, which is called 'Non-Cooperative Development' by Lancelot, now seems to be fully working.

Let me explain some details:

Generally a warning gives a hint, that something in the actual configuration is running different from what the script author assumed.
Because WinBuilder decides that this 'different' with high propability is harmless, it does not give an error.
But because there is a very small possibility that the statement causes some troubles, the warning is given.

When I first run nativeEx_barebone with this new WinBuilder functionality, I got a lot of warnings.
And some of them really are author's mistakes
And I have to confirm, that such an author mistake is in my hivesFactory script.

Let me enum some samples, starting with my own author's mistake:

  • #1: RegWrite,HKLM,0x3,WB-Setup\ControlSet001\Control\Lsa,Bounds,"0030000000200000"
    The Help tells us:
    0x3 - Binary data - adds data in binary format. Each byte is specified by groups of two digits splitting each value with commas
    Currently silently only the first byte is stored w/o any warning / error message.
    I do not know what happens in the running PE if it uses only '00' rather than the complete data set. Maybe everything works fine, maybe some 'voodoo'
    WARNING Message
  • #2: A different sample which is solved by the author very well:
    In his EarlyStarter script, fxscrpt overwrites an existing REG-MULTI_SZ value.
    This is done very carefully, and the new value contains the current entries.
    But a small concern:
    The 'current entries' are got from a 'standard' installation. What, when a different script previously added an item?
    WARNING Message
  • #3: Very often it happenes that some texts (captions, tooltips etc) which are coming from the native language CD, are overwritten by a script with the script's author's text (usually english)
    WARNING Message
Let it be enough now with the introduction.

Tomorrow I'm going to describe the 'How To Work With This'

And a general author's rule should be:
I publish a script only if there are no warnigs with my script inside a project!

Peter

#2 fxscrpt

fxscrpt

    Frequent Member

  • .script developer
  • 328 posts
  •  
    Germany

Posted 24 June 2009 - 08:13 PM

Thanks for the feature!!

I agree copying 'something' from 'someplace' is a bad habit.

But there are sometimes good reasons for overwriting defaults

1. we want to add extra functionality which win setup is not designed for.
2. we are not able to carefully analyze and easily set the right value.

Example for 1:
ServiceGroupOrder in EarlyStarter.
Win setup uses/needs only ~5 different service groups.
Why do we setup fltrmgr for a non exsiting group "FSFilter Infrastructure"?
(and in contrast for BusExtenders.Load in txtsetup.sif = System Bus Extender?)

Services configured for non existent group will start in undefined order by SCM, which makes trouble!!
(unless configured in txtsetup.sif)

ServiceGroupOrder is very similar (not identical) to real os , carefully tested and well-planned bringing SCM to the right path (as already mentioned , thank you!)

Example for 2:

But a small concern:
The 'current entries' are got from a 'standard' installation. What, when a different script previously added an item?
WARNING Message


Lets say , there is a standard ServiceGroupOrder:
System Reserved
Boot Bus Extender
System Bus Extender
SCSI miniport
.
.

File System
Event Log
.
.

How to insert en extra entry before 'Event Log'?
Maybe there will be an easy way in WB078, I'd really appreciate it !!

:lol:

Peter

#3 paraglider

paraglider

    Gold Member

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

Posted 25 June 2009 - 12:31 AM

I disagree. Warnings for file overwrites / registry overwrites are useful for debugging purposes only. They should be controlled by a global winbuilder option which is switched off by default. The global option should be settable from the Tools / Options screen.

#4 pscEx

pscEx

    Platinum Member

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

Posted 25 June 2009 - 06:32 PM

Lets say , there is a standard ServiceGroupOrder:
System Reserved
Boot Bus Extender
System Bus Extender
SCSI miniport
.
.

File System
Event Log
.
.

How to insert en extra entry before 'Event Log'?
Maybe there will be an easy way in WB078, I'd really appreciate it !!

Try this under WB 076: ;)
[process]

// First just prepare writing the 'standard'

RegHiveLoad,WB-Setup,"%target_sys%\setupreg.hiv"

If,EXISTREGKEY,HKLM,"WB-Setup\ControlSet001\Control\ServiceGroupOrder","List",RegDelete,HKLM,"WB-Setup\ControlSet001\Control\ServiceGroupOrder","List"

RegWrite,HKLM,0x7,"WB-Setup\ControlSet001\Control\ServiceGroupOrder","List",First,second,third

RegHiveUnLoad,WB-Setup

// Now the 'Script Function'

RegHiveLoad,WB-Setup,"%target_sys%\setupreg.hiv"

RegRead,HKLM,"WB-Setup\ControlSet001\Control\ServiceGroupOrder","List",%current%

//Insert 'Hallo' before 'Third'

StrFormat,REPLACE,%current%,Third,Hallo#$q#$c#$qThird,%NewContent%

If,EXISTREGKEY,HKLM,"WB-Setup\ControlSet001\Control\ServiceGroupOrder","List",RegDelete,HKLM,"WB-Setup\ControlSet001\Control\ServiceGroupOrder","List"

RegWrite,HKLM,0x7,"WB-Setup\ControlSet001\Control\ServiceGroupOrder","List",%NewContent%

RegHiveUnLoad,WB-Setup

// and test the result

RegHiveLoad,WB-Setup,"%target_sys%\setupreg.hiv"

RegRead,HKLM,"WB-Setup\ControlSet001\Control\ServiceGroupOrder","List",%finally%

RegHiveUnLoad,WB-Setup

Message,%Finally%,INFORMATION
Maybe it can be done more sophisticated, but it works. :lol:

On the other hand, you are right, that there should be a REG_MULTI_SZ APPEND / INSERT ;)

Peter ;)




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users