Help - Search - Members - Calendar
Full Version: Build Scripts v2.5.3
The CD Forum > Bart's PE Builder > Plugins
justhink
Hi, All.
I personaly like sherpya's BuildScripts very much.. But it is not up-to-date..
So I update it personaly by adding some extra functions..
I think there are so many people who like BuildScripts..For those just download it from
following lik and extract it into PEBuilder Folder(**Overwrite All), then edit options in wrapper.cmd,
Build iso from PEBuilder

So EnJoY...
QUOTE


QUOTE
Build Scripts v2.5.1 by JusThinK for PEBuilder do the following Jobs....

01 - Adding hex(a) and hex(8) Exported Registry Entry from REG Files[Idea from cyrano's PostProcessing]02 - Remove Security-keys from registry hives
03 - Sort Nu2Menu Entries
04 - ConvAscii - Converting Unicode to Ansi for saving Disk Space
05 - Compress files with upx for Saving Disk Space9[Idea from cyrano's PostProcessing]
****UPX v2.01w Included
****Download new versin of upx from : http://upx.sourceforge.net/
06 - DEKO's Inf Reducer for reducing inf file size
07 - Delete Unnesseary INF Files
08 - InfCacheBuilder - Fixing INF files for faster PNP
09 - Filecase -allowing lowercased characters (for Old PEBuilder)
10 - Copy Hives for HD Install
11 - Isolinux Setup
12 - Easy Boot Integration
13 - Optmizing ISO - Duplicate File Once
14 - Uppercase All By Force
15 - Iso Creation


HISTORY:
CODE
v2.5.3
- Some Minor Bug Fixed

v2.5.2 by JusThinK
- Added support of Removing VDS Service From Regstry or XPSP2 User...

v2.5.1 by JusThinK
- CleanPERegistry.exe for Remove Security-keys from registry hives

v2.5 by JusThinK
- Add hex(a) and hex(8) Registry Entries Import Option
- Add SortMenu.exe for sorting  nu2menu Entries
- Add UPX Compression Option
- Add DEKO's Inf Reducer support
- Delete Unnesseary INF Files
- Filecase -allowing lowercased characters
- Update sort_pe.txt file
- Update MKIsoFS.EXE (cygwin)

v2.0 by JusThinK
- Add ConvAscii.exe support
- Add _allupper and _duponce option

20050305:
- removed lain image, made a small menu using syslinux menu api (sources included)
20050321
- Update fakemkisofs to call wrapper.cmd with CreateProcess instead of using system() call
20050322
- Call wrapper.cmd using cmd.exe, also set the current directory where is located the executable
- Update InfCacheBuilder.exe executable with the one versioned 1.7.0.0, no changes
justhink
I forgot add CleanPERegistry.exe function and upx2.01w
Update..
justhink
Update Again::::

Integrated into new version

01 - Adding hex(a) and hex(8) Exported Registry Entry from REG Files[Idea from cyrano's PostProcessing]
02 - Remove Security-keys from registry hives
03 - Added support of Removing VDS Service From Regstry for XPSP2 User...
04 - Sort Nu2Menu Entries
05 - ConvAscii - Converting Unicode to Ansi for saving Disk Space
06 - Compress files with upx for Saving Disk Space9[Idea from cyrano's PostProcessing]
****UPX v2.01w Included
****Download new versin of upx from : http://upx.sourceforge.net/
07 - DEKO's Inf Reducer for reducing inf file size
08 - Delete Unnesseary INF Files
09 - InfCacheBuilder - Fixing INF files for faster PNP
10 - Filecase -allowing lowercased characters (for Old PEBuilder)
11 - Copy Hives for HD Install
12 - Isolinux Setup
13 - Easy Boot Integration
14 - Optmizing ISO - Duplicate File Once
15 - Uppercase All By Force
16 - Iso Creation
Jaycee
Hi,

First of all thanx, great job... just less destructiv than other tools to reduce a little the ISO size, not bad!

Only excuse me to be a noob, but when I compile the ISO, all goes well appart from AddReg directory parsing, had to delete the dummy file, and once i launch the ISO in VirtualServer, i get an error in LSASS.exe and.... reboot :/

did nothing excentric, no plugin apart from Ghost and Network....

What did i miss?

Thanx in advance,

Jaycee
justhink
QUOTE (Jaycee @ Jun 13 2006, 06:15 PM) *
Hi,

First of all thanx, great job... just less destructiv than other tools to reduce a little the ISO size, not bad!

Only excuse me to be a noob, but when I compile the ISO, all goes well appart from AddReg directory parsing, had to delete the dummy file, and once i launch the ISO in VirtualServer, i get an error in LSASS.exe and.... reboot :/

did nothing excentric, no plugin apart from Ghost and Network....

What did i miss?

Thanx in advance,

Jaycee


Did you add anything via ADD_REG methods...

And u also send me the pebuilder log file via PM
Jaycee
HI!

Pm sent... btw i changed the wrapper as written to disable the regadd part. one problem less!

Jaycee
bober
i tried your plugin and it seem to work very well but the new wrapper.cmd script fells to build an iso.

is there an easy way to correct this?
sage03sxt
QUOTE (bober @ Jun 14 2006, 08:22 PM) *
i tried your plugin and it seem to work very well but the new wrapper.cmd script fells to build an iso.

is there an easy way to correct this?



I had this same issue. I fixed it by editing the wrapper.cmd and setting the _filecase to no. apparently this was setting bootsect.bin in all caps, when the script was looking for it as lower case.

all fixed smile.gif

SaGE
bober
_filecase was already set to "no".

still no iso.
justhink
Sorry Guies..My mistake..... Please Change th following line in wrapper.cmd :::

QUOTE
set _setupezboot=yes
to

QUOTE
set _setupezboot=no


My personal advice :::

For Better output :::

Try to avoid UPXed Part... It may cause problems... Test it then use it..
bober
changed to set _setupezboot=no
removed upx
still no iso
sherpya
uh tongue.gif
nice so I don't need to update it smile.gif
As I said before my buildscripts are for reference,
they do minimal things it's just a template for ppl want to add
more features.
Anyway I would suggest some things:
- filecase.exe is not needed, infcachebuild does it
- I don't recomend to upx system files, this will cause an increase of memory
usage

btw :: in a batch is the same of rem? I hate rem smile.gif
justhink
QUOTE (sherpya @ Jun 17 2006, 09:22 AM) *
uh tongue.gif
nice so I don't need to update it smile.gif
As I said before my buildscripts are for reference,
they do minimal things it's just a template for ppl want to add
more features.
Anyway I would suggest some things:
- filecase.exe is not needed, infcachebuild does it
- I don't recomend to upx system files, this will cause an increase of memory
usage

btw :: in a batch is the same of rem? I hate rem smile.gif


THANKS FOR REPLY
CypherPhreak
I had a problem with the build script 2.5.2 copied from the post earlier in the thread.

I had no sortfile, and (my)mkisofs.exe choked on the command line generated by the script, and refused to build the .iso.

The problem was the _sort variable, which is used for 2 distinct purposes in the scipt:
1) it is set to yes or no in the settings, to determine whether or not to use SortMenu.exe
2) it is used to set the -sort <sortfile> switch to (my)mkisofs.exe at the end of the script.

The problem was, if there is NO sortfile, _sort should be an empty string (so there will be no -sort switch), but instead it is either "yes" or "no" from use 1. The fix was to add another if after the if exist %_sortfile%, as shown below.

rem existing code, near the end of the wrapper.cmd file
if exist %_sortfile% (
echo ----
echo Detected sort file %_sortfile%, it will be used.
set _sort=-sort %_sortfile%
)
rem new code to fix the problem
if not exist %_sortfile% (
echo ----
echo No sortfile detected, no sorting will be done.
set _sort=
)

Hope this saves someone some headscratching.

--------
CypherPhreak
Nuno Brito
Sherpya, you can safely use :: instead of REM - back in 1996 I've done some testings on a 286 with a ~4,82Mhz CPU comparing the speed performance using a few hundred :: and then repeating the same test but using REM instead - go figure - after testing several rounds with both files, the :: always ran faster than the one with REM's.

In these days this I guess this is redundant.. wink.gif
justhink
QUOTE (CypherPhreak @ Jun 17 2006, 08:04 PM) *
I had a problem with the build script 2.5.2 copied from the post earlier in the thread.

I had no sortfile, and (my)mkisofs.exe choked on the command line generated by the script, and refused to build the .iso.

The problem was the _sort variable, which is used for 2 distinct purposes in the scipt:
1) it is set to yes or no in the settings, to determine whether or not to use SortMenu.exe
2) it is used to set the -sort <sortfile> switch to (my)mkisofs.exe at the end of the script.

The problem was, if there is NO sortfile, _sort should be an empty string (so there will be no -sort switch), but instead it is either "yes" or "no" from use 1. The fix was to add another if after the if exist %_sortfile%, as shown below.

rem existing code, near the end of the wrapper.cmd file
if exist %_sortfile% (
echo ----
echo Detected sort file %_sortfile%, it will be used.
set _sort=-sort %_sortfile%
)
rem new code to fix the problem
if not exist %_sortfile% (
echo ----
echo No sortfile detected, no sorting will be done.
set _sort=
)

Hope this saves someone some headscratching.

--------
CypherPhreak



sort file is available under BSv2.5.3 as "sort_pe.txt"
or u set ur own by using
QUOTE
@echo off
FOR /f "tokens=1* delims== skip=1 eol=;" %%a IN (%CD%\input.inf) DO IF "%%a"=="volumeid" SET _volid=%%b
IF "%_volid%"=="" SET _volid=WindowsPE
set _sortfile=sort_pe.txt
set _mkisofsexe=mymkisofs.exe


If there is no sort file then script automatically skip that portion..smile.gif
swspjcd
Hey Justhink,
Where can I get the latest version of your build scripts? I did something to the one I've been using 2.5.1 and now it isn't working right so I want to start over but with the latest version. The links posted earlier in this thread and also on your forums on your www don't work anymore. Or is there a later postprocessing script with even more features?
Thanks much!
UPDATE:
Somehow the %CD% parameter is no longer being passed to wrapper.cmd so it's failing. I just added a "set CD=c:\pebuilder" and "cd /d %CD%" lines at the beginning of wrapper.cmd so that fixed it as long as I always have pebuilder in c:\pebuilder. Still hoping to get v2.5.3 for all latest features though.

QUOTE (justhink @ Jun 21 2006, 11:34 AM) *
QUOTE (CypherPhreak @ Jun 17 2006, 08:04 PM) *
I had a problem with the build script 2.5.2 copied from the post earlier in the thread.

I had no sortfile, and (my)mkisofs.exe choked on the command line generated by the script, and refused to build the .iso.

The problem was the _sort variable, which is used for 2 distinct purposes in the scipt:
1) it is set to yes or no in the settings, to determine whether or not to use SortMenu.exe
2) it is used to set the -sort <sortfile> switch to (my)mkisofs.exe at the end of the script.

The problem was, if there is NO sortfile, _sort should be an empty string (so there will be no -sort switch), but instead it is either "yes" or "no" from use 1. The fix was to add another if after the if exist %_sortfile%, as shown below.

rem existing code, near the end of the wrapper.cmd file
if exist %_sortfile% (
echo ----
echo Detected sort file %_sortfile%, it will be used.
set _sort=-sort %_sortfile%
)
rem new code to fix the problem
if not exist %_sortfile% (
echo ----
echo No sortfile detected, no sorting will be done.
set _sort=
)

Hope this saves someone some headscratching.

--------
CypherPhreak



sort file is available under BSv2.5.3 as "sort_pe.txt"
or u set ur own by using
QUOTE
@echo off
FOR /f "tokens=1* delims== skip=1 eol=;" %%a IN (%CD%\input.inf) DO IF "%%a"=="volumeid" SET _volid=%%b
IF "%_volid%"=="" SET _volid=WindowsPE
set _sortfile=sort_pe.txt
set _mkisofsexe=mymkisofs.exe


If there is no sort file then script automatically skip that portion..smile.gif
paraglider
If you are using the original Sherpya fake mkisofs then the batch file has 2 parameters which you can set into environment variables by:

for %%i in (%1) do set iso=%%~i
for %%i in (%2) do set pedir=%%~i
swspjcd
Thanks for the reply. I actually tried that first because both of those are already in my wrapper.cmd but "pedir" ended up pointing to "c:\pebuilder\builds". What I can't figure out is where the %cd% variable is being passed from. I added a "echo 1=%1 2=%2 3=%3 ..." to the beginning on wrapper.cmd to see what exactly was being passed to it but it looks like only "C:\pebuilder\isos\test.iso" and "c:\pebuilder\builds" are passed.
J.


QUOTE (paraglider @ Apr 17 2007, 03:19 AM) *
If you are using the original Sherpya fake mkisofs then the batch file has 2 parameters which you can set into environment variables by:

for %%i in (%1) do set iso=%%~i
for %%i in (%2) do set pedir=%%~i
daederatz
QUOTE (swspjcd @ Apr 17 2007, 12:50 PM) *
Thanks for the reply. I actually tried that first because both of those are already in my wrapper.cmd but "pedir" ended up pointing to "c:\pebuilder\builds". What I can't figure out is where the %cd% variable is being passed from. I added a "echo 1=%1 2=%2 3=%3 ..." to the beginning on wrapper.cmd to see what exactly was being passed to it but it looks like only "C:\pebuilder\isos\test.iso" and "c:\pebuilder\builds" are passed.
J.


QUOTE (paraglider @ Apr 17 2007, 03:19 AM) *
If you are using the original Sherpya fake mkisofs then the batch file has 2 parameters which you can set into environment variables by:

for %%i in (%1) do set iso=%%~i
for %%i in (%2) do set pedir=%%~i



%CD% doesn't need to be passed, it's always "there" in any cmd session and points to the current working directory. Just type
CODE
echo %CD%

in any command window to get the drift...
swspjcd
Unfortunately when I run pebuilder.exe from the command line from within the c:\pebuilder directory or from a shortcut, the value for %cd% is set at "c:\" and not "c:\pebuilder" so it looks like I'm forced to edit wrapper.cmd to have a line in there pointing to c:\pebuilder. It's not really a big deal. I'm just not sure what has changed to make it start misbehaving.

QUOTE (daederatz @ Apr 17 2007, 03:30 PM) *
QUOTE (swspjcd @ Apr 17 2007, 12:50 PM) *
Thanks for the reply. I actually tried that first because both of those are already in my wrapper.cmd but "pedir" ended up pointing to "c:\pebuilder\builds". What I can't figure out is where the %cd% variable is being passed from. I added a "echo 1=%1 2=%2 3=%3 ..." to the beginning on wrapper.cmd to see what exactly was being passed to it but it looks like only "C:\pebuilder\isos\test.iso" and "c:\pebuilder\builds" are passed.
J.


QUOTE (paraglider @ Apr 17 2007, 03:19 AM) *
If you are using the original Sherpya fake mkisofs then the batch file has 2 parameters which you can set into environment variables by:

for %%i in (%1) do set iso=%%~i
for %%i in (%2) do set pedir=%%~i



%CD% doesn't need to be passed, it's always "there" in any cmd session and points to the current working directory. Just type
CODE
echo %CD%

in any command window to get the drift...
daederatz
QUOTE (swspjcd @ Apr 17 2007, 03:53 PM) *
Unfortunately when I run pebuilder.exe from the command line from within the c:\pebuilder directory or from a shortcut, the value for %cd% is set at "c:\" and not "c:\pebuilder" so it looks like I'm forced to edit wrapper.cmd to have a line in there pointing to c:\pebuilder. It's not really a big deal. I'm just not sure what has changed to make it start misbehaving.


Do you really mean from the command line, or from a script?

If the former, and the command line is "C:\pebuilder\pebuilder.exe" then indeed you are not changing into the "c:\pebuilder" directory and %cd% is behaving as expected. But why do you want to do it that way?

If you're running it from a shortcut, likely the shortcut-properties are just wrong, i.e working directory empty or set to "c:\"? Just try setting it to "c:\pebuilder"...
swspjcd
I have been running it by executing "pebuilder.exe while in the "c:\pebuilder" directory and the value for %cd% is "c:\" by the time wrapper.cmd is called. When I run it from a shortcut that points to "c:\pebuilder\pebuilder.exe" and the working directory is correctly set to "c:\pebuilder" the value for %cd% is still "c:\" when wrapper.cmd is called. And this is happening on 2 different machines also.
J.

QUOTE (daederatz @ Apr 17 2007, 04:56 PM) *
QUOTE (swspjcd @ Apr 17 2007, 03:53 PM) *
Unfortunately when I run pebuilder.exe from the command line from within the c:\pebuilder directory or from a shortcut, the value for %cd% is set at "c:\" and not "c:\pebuilder" so it looks like I'm forced to edit wrapper.cmd to have a line in there pointing to c:\pebuilder. It's not really a big deal. I'm just not sure what has changed to make it start misbehaving.


Do you really mean from the command line, or from a script?

If the former, and the command line is "C:\pebuilder\pebuilder.exe" then indeed you are not changing into the "c:\pebuilder" directory and %cd% is behaving as expected. But why do you want to do it that way?

If you're running it from a shortcut, likely the shortcut-properties are just wrong, i.e working directory empty or set to "c:\"? Just try setting it to "c:\pebuilder"...
swspjcd
I found the problem. By default, when opening command prompt, the default drive had previously been my Y: drive. I added an AUTORUN entry in HKLM\Software\Microsoft\Command Processor that did "cd /d c:\" so every time a new command prompt would open, it would change to "c:\" as my default drive and not "y:\". This adversely affected wrapper.cmd because apparently the autorun is running beforehand. Removing the autorun entry solved it.
Unfortunately since I am running ultramon which seems to manage it's own shortcuts so it can control what monitor a program gets displayed on when executed, I can't just change the "start in" option for the shortcut for cmd.exe to make the default drive and directory "C:\" because ultramon appears to ignore it when executing cmd.exe, hence the autorun entry was needed (but has now since been removed).
J.
hilander999
I've no idea what JusThink has done in this script because I have no need or time to debug anything else at the moment, BUT from the sound of it, all you need to do is add 1 line to the top of the files as follows....

CD /D %~dp0

If that line is not already in the script, then it MIGHT solve this issue.
when you call a script with cmd /c, it starts in the default location, not the cmd file location.
This line tells the script to change to the drive/directory that the script was started in, thus making %cd% the actual starting point rather then the default cmd.ece location.

If you are having a "Spaces in the path" problem, you could use this variant...

CD /D %~dps0

The only difference here is that this option switches to the short dos name (8+3) of the starting floder so that any refferance to %cd% will only show the short dos name for that folder.
samplempg
New download link please rolleyes.gif


I know RapidShare is best choice for unlimit bandwidth downloading, but I still recommand upload to yahoo geocities for 2nd backup link.

note: Most people don't like use geocities because it got bandwidth limit per hour, but It never delete your files. (look..my files are still there from 5 years ago)
ggg
File not found. link is gone sad.gif
justhink
Reuploaded
VeeDub
If the REG_ADD succeeds, should I see some activity reported in the pebuilder.log?
VeeDub
I have worked out why this is not working for me. This buildscript is used when building an ISO.

I am interested in using the REG_ADD option. However my Bart image is written to a USB key, so in Pebuilder my media output option is None; and I am not building an ISO.

Is there a way for me to call wrapper.cmd without creating an ISO image? I have tried calling from the command line as follows:
CODE
wrapper XenTools D:\pebuilder3110a


Output:
CODE
_
***************************************
Build Script for BartPE v2.5.3
Original Code By Sherpya
Modified By JusThinK
Web :- http://www.justthink.tk
Date: Mon 07/09/2009, Time: 20:39:49.29
***************************************
_
[Active Actions for WindowsPE]
------------------------------
: Remove Security-keys from registry hives :
: Adding Registry Entry from REG Files :
: Sort Nu2Menu Entries :
: ConvAscii - Converting Unicode to Ansi :
: DEKO's Inf Reducer :
: InfCacheBuilder For Fixing INF files :
: Optmizing ISO - Duplicate File Once :
: Iso Creation :
_
Source directory: d:\pebuilder3110a
Destination iso file: XenTools
Pebuilder Root : D:\pebuilder3110a
_
[Remove Security-keys from registry hives]
Failed to delete key EventLog\Security, ret=5
_
[Adding Registry Entry from REG Files]
all .reg files found in Dir: D:\pebuilder3110a\REG_ADD will be integrated into the PE-Registry
!Error Found! Script Aborted

This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2009 Invision Power Services, Inc.