zbarre wrote> Is it possible to execute a .cmd script at the end of the startup of BartPE ?
Yes it is I use BartPE from Server2003/RIS via PXE boot from server class machines. All I do is press F12 and I have the RIS .OSC screens fully automated to automatically login to RIS and run only BartPE (do you need anything more?)
Check the following plugin directory:
pebuilder3110a\plugin\penetcfg and look for the
penetcfg.ini You can edit this .ini file with your favorite text editor like Notepad. I have bolded the lines that are critical to fully automating Network startup in BartPE and the line you asked for in particular is shown at the bottom of the listing shown below.
pebuilder3110a\plugin\penetcfg\penetcfg.ini[General]
AutoStartNet=YesPromptForProfile=NoShowGUI=No;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[NetProfiles]
Dynamic IP Address (DHCP)= penetcfg-dhcp.ini
Static IP Address (Manual)= penetcfg-static.ini
Custom from A:\= a:\penetcfg.ini
Custom from C:\= c:\penetcfg.ini
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[NetID]
; ComputerName = CRS-PE
Workgroup = crs.yourdomain.com
PrimaryDNSSuffix = crs.yourdomain.com
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[FileSharing]
StartFileSharingService = No
; AdminAccount = Pierre
; AdminPassword = 123456
; AdminPassword = * (to be prompted for a password)
; AdminPassword = *
; ShareDriveRoots = Yes
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[NetAdapter1]
; SpeedAndDuplex = {10|100|1000},{Half|Full}
SpeedAndDuplex = Default (for default settings)
;SpeedAndDuplex = 1000,Full
EnableDHCP = Yes
UseStaticGateway = No
UseStaticDNS = No
UseStaticWINS = No
;IPAddress = 192.168.75.2,192.168.75.3
;SubnetMask = 255.255.255.0,255.255.255.0
;DefaultGateway = 192.168.75.230
;DNSServer = 192.168.75.200,192.168.75.201,192.168.75.202
;WINSServer = 192.168.75.150
[NetAdapter2]
;SpeedAndDuplex = 1000,Full
EnableDHCP = Yes
UseStaticGateway = No
UseStaticDNS = No
UseStaticWINS = No
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
; You can map up to 10 network drives: [NetDrive1] ... [NetDrive10];
[NetDrive1]
; Drive = x:
; Drive = * (to use the first available drive letter)
Drive = Z:
NetworkPath = \\Server\Path
UserName = Domain\Username
; Password = (leave it empty to be prompted for a password)
Password = Userpassword
[NetDrive2]
;same syntax as NetDrive1 if you want to map more drives
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[PostNetAutoRun]
; StarupFlag = CommandLine
; StartupFlag is a bit field that can take the following values:
; 0 = run hidden and wait (00 00 00 00)
; 1 = run normal and wait (00 00 00 01)
; 2 = run hidden and don't wait (00 00 00 10)
; 3 = run normal and don't wait (00 00 00 11)
3 = z:\scripts\menu.batJust to claify there are other Netprofiles like "penetcfg-dhcp.ini" and "penetcfg.static.ini" but BartPE looks at the "penetcfg.ini" first and if you have the AutoStartNet=Yes and PromptForProfile=No and ShowGUI=No then BartPE will not look at the other NetProfiles and will opt to use whatever default settings you have made farther down in the penetcfg.ini file. Make sense?

A slick trick is to map a network drive using the NetDrive section then run the .CMD or .BAT file from a the network drive, this makes it real simple and quick to modify the .CMD file and try different options. My current Menu.Bat has options for running Ghost (with switches of my choosing), installing Server2003, using Diskpart to partition RAW disks and assign them the correct drive letters and format them, run McAfee A/V scans, etc.

Hope this helps you out...