Jump to content











Photo
- - - - -

Errors during Build


  • Please log in to reply
12 replies to this topic

#1 ArthurD

ArthurD
  • Members
  • 4 posts
  •  
    United States

Posted 19 December 2007 - 08:45 PM

I am very new to WinBuilder (although I have some experience with peBuilder) and I am getting some strange errors during the build process.

I downloaded "WinBuilder72a-BartPECore-full" and followed the instructions for a default build. The result worked 1st. time, which was very impressive.

I then tried to incorporate my own script to include a simple application, and promtly got the following error during the build:

PE Builder UA Loader by thuun - Error, pebuilder.exe not found
PEBUAL.exe runs PEBuilder unattended and auto closes builds containing errors that would normally be paused for inspection. Run this file in the pebuilder.exe folder. See the pebuilder input.ini for configuration options.

The WinBuilder log file indicated the error occured during a check for the setupreg.hiv file:

IF - File does not exist: [D:\WinPE\WinBuilder\BartPE\i386\system32\setupreg.hiv] executing command: [Halt,*Error!* Build Halted. Setup hive was not created. Reboot if problem persists.]

I tried the reboot suggestion, without any improvement.

I checked the build output directory, but it was empty. I ran peBuilder.exe directly, and it completed without an error. I assumed I had done something stupid while making my script, so I removed the entire Winbuilder directory and downloaded it again (without my script), but when I tried to build the project I got exactly the same error. I then tried downloading another project (NativePE), but got the same error again.

I am using Windows XP SP2 as my source, copied to a hard drive.

I have searched the forum for similar problems without seeing anything that could explain what is happening. Has anybody had a similar experience, or possibly suggest where I could start fixing this?

#2 MedEvil

MedEvil

    Platinum Member

  • .script developer
  • 7771 posts

Posted 19 December 2007 - 10:21 PM

Open regedit, look under HKLM and unmount the loaded PE hive.
After that, everything should work again just fine.

:cheers:

#3 ArthurD

ArthurD
  • Members
  • 4 posts
  •  
    United States

Posted 20 December 2007 - 06:37 PM

Open regedit, look under HKLM and unmount the loaded PE hive.
After that, everything should work again just fine.

:cheers:


Thanks! However, I'm not sure exactly what I'm doing here - which is the wrong time to be editing the registry!

I have 2 empty keys under HKLM - The first is "SAM", which has a single, empty, subkey of "SAM". The second is "SECURITY", which has no subkeys. I think both refer to the peBuilder work (there are files with the same neme in peBuilders "/i386/system32/config" diretory when the build is complete), and both have a menu entry that includes "Unmount Hive". However I am prevented from unmounting or even deleting them (Accesss Denied!). I have tried this with both the normal user (an administrator) and from the "Administrator" account. The original files are also deleted - when I cleared the directory to re-install WinBuilder.

Any help you can offer is very much appreciated.

- Arthur

#4 pscEx

pscEx

    Platinum Member

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

Posted 20 December 2007 - 07:11 PM

Thanks! However, I'm not sure exactly what I'm doing here - which is the wrong time to be editing the registry!

I have 2 empty keys under HKLM - The first is "SAM", which has a single, empty, subkey of "SAM". The second is "SECURITY", which has no subkeys. I think both refer to the peBuilder work (there are files with the same neme in peBuilders "/i386/system32/config" diretory when the build is complete), and both have a menu entry that includes "Unmount Hive". However I am prevented from unmounting or even deleting them (Accesss Denied!). I have tried this with both the normal user (an administrator) and from the "Administrator" account. The original files are also deleted - when I cleared the directory to re-install WinBuilder.

Any help you can offer is very much appreciated.

- Arthur

So it looks like that the 'standard' issue MedEvil assumed, is not responsible here.
It makes it a bit more complicated for you: To help you, we need some more information:
Please do the following:
  • Start from scratch again, like you described above.
  • Build the project
  • After building, click the 'Log' tab and inside that, click 'Save as Log.html'
  • Save <Dir where WinBuilder.exe remains>\log.html named 'original.html' in a dir of your choice
  • Add your special <myscript.script>
  • Build the project
  • After building, click the 'Log' tab and inside that, click 'Save as Log.html'
  • Save <Dir where WinBuilder.exe remains>\log.html named 'with-my-script.html' in a dir of your choice
Post the two log.html mentioned above and additionally post <myscript.script>

Usually this is sufficient to find the root of your troubles.
(If not, after your post I'll demand something more.)

Peter

#5 ArthurD

ArthurD
  • Members
  • 4 posts
  •  
    United States

Posted 20 December 2007 - 09:34 PM

So it looks like that the 'standard' issue MedEvil assumed, is not responsible here.
It makes it a bit more complicated for you: To help you, we need some more information:
Please do the following:

  • Start from scratch again, like you described above.
  • Build the project
  • After building, click the 'Log' tab and inside that, click 'Save as Log.html'
  • Save <Dir where WinBuilder.exe remains>\log.html named 'original.html' in a dir of your choice
  • Add your special <myscript.script>
  • Build the project
  • After building, click the 'Log' tab and inside that, click 'Save as Log.html'
  • Save <Dir where WinBuilder.exe remains>\log.html named 'with-my-script.html' in a dir of your choice
Post the two log.html mentioned above and additionally post <myscript.script>

Usually this is sufficient to find the root of your troubles.
(If not, after your post I'll demand something more.)

Peter


Peter,

Thanks for the help, but I think we have a missunderstanding. I have abandoned the script I was building until I can get the "un-molested" original downloaded Winbuilder progect to build. At present, I am receiving the errors just a few seconds into the build, and the build does not complete. I will gladly post the log, but I think the problem is more similar to that which MedEvil was suggesting - I have somehow messed up my setup with the attempted build that first failled, but I am not sure how to fix it back to "square one". I am attaching the log from the failled default build in case you can determine what is going on.

Thanks again.

Attached File  log.html   49.34KB   315 downloads

- Arthur

#6 MedEvil

MedEvil

    Platinum Member

  • .script developer
  • 7771 posts

Posted 20 December 2007 - 10:12 PM

ArthurD, your setupreg.hiv is still mounted.
If this is caused by the crash, it should be mounted under something like HKLM\wb-setup on the machine you ran WinBuilder on.
If you can't find it there, have a look into your script and check if/where you've mounted setupreg.hiv to.

A word about regedit.
Don't try to delete anything!!! Use just unmount!!!
If unmount is not available for a key, that key isn't mounted but belongs to the original registry!

:cheers:

#7 ArthurD

ArthurD
  • Members
  • 4 posts
  •  
    United States

Posted 22 December 2007 - 01:58 AM

Sorry for being slow in following-up on this. Had to do some last minute Christmas stuff (!)

I think I have found a solution, but I still have no explanation for the problem.

I checked the registry very carefully, and could find no "stuck" hives. I then traced the project scrips for registry calls and, as MedEvil suggested, they were in the form "wb-setup", etc, and would be easy to find if they were still loaded.

I checked the "Tools" folder for more info on the "pebual.exe" file and read the "pebual-readme.txt", which suggests:

"Run pebual.exe in the pebuilder.exe folder, see the pebuilder input.ini for configuration options." (I assume "input.ini" here is reffering to "input.inf")

I did this, and peBuilder ran without any errors (although the resulting build was almost empty). I think this suggests that there are no peBuilder registry hives unloaded.

I then started tracing the scripts for the project to find where the error was being called. The error is coming immediately after the call to run peBuilder, which may be in one of two ways:

Echo,"Running PE Builder, please wait.."
If,%pCheckBox3%,Equal,True,ShellExecute,"Hide","%Tools%\pebual.exe"
If,%pCheckBox3%,Equal,False,ShellExecute,"Hide","%BaseDir%\pebuilder.exe","-auto -overwrite -exit"
//
If,NotExistFile,"%TargetSys32%\setupreg.hiv",Halt,"*Error!* Build Halted. Setup hive was not created. Reboot if problem persists."

I found the checkbox in question (#3), which has the caption "Close pebuilder if no errors (no pause)". My suspicion was that the call to pebual.exe was the problem, so I unchecked this checkbox and ran the project again. The script ran completely with a small number of "files not found" errors (I have not investigated yet to determine what these are).

This is encouraging! However, I am certain that I did not mess with anything on my first build (I did not uncheck anything), so why did this problem develop on subsequent builds even with a default installation? Are the project settings stored somewhere outside the program directory (in the registry?) - Could they have remained after I wiped the WinBuilder and refreshed it?

Additionally, how does pebual.exe find pebuilder.exe without parameters passed during the script call. If the recommendations are "Run pebual.exe in the pebuilder.exe folder...", then I presume it looks for pebuilder in it's own directory. Yet I can find no "ini" or "inf" file in the "Tools" directory that would be used by pebual.exe to assist it when called from elsewhere. If pebual.exe is not finding pebuilder.exe, then it would return to the script without any registry hives being constructed, which would explain the error.

I am at a loss to explain what happened here. When I have had time to check out what is now being built I will let you know. Again, if anyone has any ideas, I welcome your input.

- Arthur

#8 pscEx

pscEx

    Platinum Member

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

Posted 22 December 2007 - 09:37 AM

I could reproduce your error.

I download and expanded the latest WinBuilder072045b-Bpec_full.exe into an empty dir.
The first run was perfect.
The second one (without any change) brought your error.

I PM Thuun to look for this.

Peter

#9 pscEx

pscEx

    Platinum Member

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

Posted 22 December 2007 - 02:46 PM

Maybe a small debug aid for thunn:
  • Download WinBuilder072045b-Bpec_full.exe into an empty directory
  • Expand it and start WinBuilder
  • Define the source
  • Build > OK you come into VBox
  • Build again > OK you come into VBox
  • Build again > OK you come into VBox
  • ....
  • Leave WinBuilder and restart
  • Build > :cheers:
But now 'Guru's Ultimate Bug Hunting Help': ( :cheers: )
  • Download WinBuilder072045b-Bpec_full.exe into an empty directory
  • Expand it and start WinBuilder
  • Define the source
  • Leave WinBuilder and restart
  • Build > :cheers:
Peter

#10 thunn

thunn

    Silver Member

  • .script developer
  • 531 posts
  • Location:Brooklyn, New York
  • Interests:computers<br />mechanics<br />distortion<br /><br />
  •  
    United States

Posted 23 December 2007 - 08:35 AM

must be that darn WinBuilder causing the problem! :cheers:
( kidding! )
Thanks for the message Peter.

I will have to do a test to determine the problem. It's very late and into the early am, so, I may have to report later in the morning, a few hours sleep will no doubt assist the process.

Here's the good news, my personal build folder is reused often, works very well, and is almost identical to the upload. Further more, I can tell you this..

It's unlikely any registry hives are locked. Really unlikely if you rebooted.
If pebual.exe is active via the 'fix halted builds' checkbox, pebuilder is forced to unload it's hives before closing in the event of a halted build.
Possibly loaded temp hives, winbuilder's also, are always checked for and unloaded before processing starts.
Bart makes it tricky to access his temp hives, he reversed some characters in the temp hivs path, but I did figure out how to unload them if a build was halted early. The following unloads pebuilder temp hives before removing the old target..

&#91;UnldPEBhivs&#93;

ShellExecute,&#34;hide&#34;,&#34;cmd.exe&#34;,&#34;/c echo &#91;pebuilder&#93; > #$q%ScriptDir%\hivstr.ini#$q &&echo string=%TargetSys32% >> #$q%ScriptDir%\hivstr.ini#$q&#34;

TXTReplace,&#34;%ScriptDir%\hivstr.ini&#34;,&#34;\&#34;,&#34;/&#34;

IniRead,&#34;%ScriptDir%\hivstr.ini&#34;,&#34;pebuilder&#34;,&#34;string&#34;,%hivpathstr%

ShellExecute,&#34;hide&#34;,&#34;reg.exe&#34;,&#34;unload #$qHKU\PEBuilder.exe-%hivpathstr%/config/petmphive#$q&#34;

ShellExecute,&#34;Hide&#34;,&#34;cmd.exe&#34;,&#34;/c#$sattrib.exe#$s/s#$s/d#$s-s#$s-r#$s#$q%TargetDir%#$q&&rd#$s/s#$s/q#$s#$q%TargetDir%#$q&#34;

FileDelete,&#34;%ScriptDir%\hivstr.ini&#34;
I've halted many builds, it does work.

A similar section is in the script.project, the main page 'cleanup' button willl check and unload pebuilder hivs not unloded, or wb hivs not unloaded, in addition to the file cleanup.

..

ArthurD, you asked some really good questions.

Additionally, how does pebual.exe find pebuilder.exe without parameters passed during the script call. If the recommendations are "Run pebual.exe in the pebuilder.exe folder...", then I presume it looks for pebuilder in it's own directory.

No argument is required when in BartPECore because pebual is called from Winbuilder, which resides in the BaseDir next to pebuilder. Hope that makes sense.
Pebual.exe must be run next to pebuilder if used outside of BartPECore. It has standard unattended switches built in and no configuration file.

Up to now the above has worked well and not presented a problem, but, it may be related to the error, though in that case, unchecking the 'fix halted builds' box would have fix the problem.

Let me go have a quick look, good discussion. :cheers:
A new Project version will be uploaded soon.
G'Night all!
:cheers:

#11 pscEx

pscEx

    Platinum Member

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

Posted 23 December 2007 - 09:07 AM

Here's how pebual works..
No argument is required when used in conjunction with winbuilder because pebual is called from winbuilder, which resides in the ºsedir% next to pebuilder. Hope that makes sense.
Pebual.exe must be run next to pebuilder if used outside of BartPECore. It has standard unattended switches built in and no configuration file.

Maybe here is the root of the problem:
pebual is in the %Tools% dir. If I copy into %BaseDir% and start there, the project runs well.

Peter

#12 thunn

thunn

    Silver Member

  • .script developer
  • 531 posts
  • Location:Brooklyn, New York
  • Interests:computers<br />mechanics<br />distortion<br /><br />
  •  
    United States

Posted 23 December 2007 - 10:43 AM

I was thinking the same

Attached Files



#13 thunn

thunn

    Silver Member

  • .script developer
  • 531 posts
  • Location:Brooklyn, New York
  • Interests:computers<br />mechanics<br />distortion<br /><br />
  •  
    United States

Posted 24 December 2007 - 05:18 PM

Thanks for the reports, a new project is online!




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users