balubeto Posted March 17, 2009 Posted March 17, 2009 (edited) HII read the article http://technet.microsoft.com/en-us/library/cc709665.aspx and, at the end of step 4, I found something that is not clear to me: How do I ensure that the various additional tools are loaded with Windows PE?THANKSBYE Edited March 17, 2009 by balubeto
allanf Posted March 17, 2009 Posted March 17, 2009 If you need the tools to load into RAM so that you can access them in Windows PE without media, you must copy them to the mount directory. In the walk-through:c:\winpe_x86\mountOtherwise you can copy them to the iso directory, in which case they will be available to Windows PE from the boot-medium. In the walk-through:c:\winpe_x86\isoGiven the above, you must follow the rest of the Walk-Through - unmounting, replacing the default boot.wim, and creating the .iso accordingly.Regards
Tripredacus Posted March 17, 2009 Posted March 17, 2009 After I mount the WIM, I usually put any "tools" (aka programs I want in there) in the Windows folder.
allanf Posted March 17, 2009 Posted March 17, 2009 The \mount\Windows or \mount\Windows\System32 is OK if you have are planning a customization with one or two extra tools. Without a GUI shell and shortcuts, they're in the PATH to find and execute from the command prompt.To keep things in order, I reproduce full Windows and create a "Program Files" directory and sub-directories in the root of the RAM drive, i. e. "\mount\Program Files\etc." when building. For Programs to run from the medium, "\iso\Program Files\etc." If I don't use a GUI shell with shortcuts, I set the PATH to the all the executables.Regards
balubeto Posted March 17, 2009 Author Posted March 17, 2009 The \mount\Windows or \mount\Windows\System32 is OK if you have are planning a customization with one or two extra tools. Without a GUI shell and shortcuts, they're in the PATH to find and execute from the command prompt.To keep things in order, I reproduce full Windows and create a "Program Files" directory and sub-directories in the root of the RAM drive, i. e. "\mount\Program Files\etc." when building. For Programs to run from the medium, "\iso\Program Files\etc." If I don't use a GUI shell with shortcuts, I set the PATH to the all the executables.RegardsSo if I add a Tools directory to \mount\Windows or \mount\Windows\System32 with the various no-GUI utilities grouped in directories, these utilities work on any working current directory or not? It is more correct to use the directory \mount\Windows\Tools or \mount\Windows\System32\Tools to do this work or is it the same?THANKSBYE
Tripredacus Posted March 17, 2009 Posted March 17, 2009 It does not matter where you put the files. I would recommend that you do not use a relative path to your files from your scripts or other programs. This will make things easier for you in troubleshooting I think.
allanf Posted March 18, 2009 Posted March 18, 2009 So if I add a Tools directory to \mount\Windows or \mount\Windows\System32 with the various no-GUI utilities grouped in directories, these utilities work on any working current directory or not? It is more correct to use the directory \mount\Windows\Tools or \mount\Windows\System32\Tools to do this work or is it the same?By default Windows PE boots to the cmd prompt with the current directory, Windows\system32\. From there, you can't execute anything in customized sub-directories unless you change directories or set the PATH accordingly. With cmd as the Shell, use startnet.cmd to set the PATH to all the extra Programs at startup.Personally, I think it more correct to create the custom directories and sub-directories in the root of the drive - either RAM or medium - just like a full Windows OS. For the WAIK Tools, I actually create a 'Tools' directory too. For the RAM Drive, the situation when booted is:X:\WindowsX:\Program FilesX:\Tools... all created in the root of your mount directory when building the image.If not run from RAM because of memeory restrictions, do the same except in the iso directory. Take care that not all Programs are able to run from read-only media. RAM is writeable.AFAIK, the 'Servicing' directory needs to be in a relative path to pkgmgr. For example:mount\Tools\pkgmgrmount\Tools\Servicing\Regards
IcemanND Posted March 18, 2009 Posted March 18, 2009 The guide that is stickied at the top of the PE forum gives you step by step instructions and info on creating a PE cd.
allanf Posted March 18, 2009 Posted March 18, 2009 (edited) For a ready-made script and the brilliant scripting-engine, Winbuilder, download the following .zip, extract it to a path without spaces, double-click winbuilder, choose from a selection of shells and programs, and press 'PLAY'! ... ...The two scripts are not much more than 100KB. Everything is either downloaded from the web or copied from an installed Windows AIK directory, extracted and installed directly into a mounted winpe.wim (or into the iso directory if selected to not run Programs and/or Tools from RAM).The resulting bootable WinPE .iso will be located in the <Winbuilder Base Directory>\ISO folder, ready to burn to CD. For USB/HDD booting, the iso files are located in <Winbuilder Base Directory>\Temp\pe2\ISO folder. For any other purpose such as dual-booting simply from a .wim, use the <Winbuilder Base Directory>\Temp\pe2\ISO\sources\boot.wim file.Requires Windows AIK 1.1 (released for Vista SP1) installed in the conventional 'Program Files' location - alternatively select a less-conventional location under the 'Source Directory' Tab in Winbuilder.http://pe2.winbuilder.net/pe21.003/pe21.003d/pe21.003d.zipIt's the lazy way! ... ... Edited March 18, 2009 by allanf
balubeto Posted March 18, 2009 Author Posted March 18, 2009 In conclusion, I have to edit the startnet.cmd file and write the various additional directories where I put the additional tools that need to be able to work on any working current directory. Correct?Mounting the winpe.wim file on a directory, where you find the startnet.cmd file?THAMKSBYE
allanf Posted March 18, 2009 Posted March 18, 2009 In conclusion,This is just the beginning of a long road. ... ...startnet.cmd is in your mount\windows\system32The one default entry should be 'wpeinit', to initialiize PNP and Network support at startup. It can take a few moments.Add:SET PATH=%PATH%;<Path to your custom directory>If you like add:@ECHO OFFto the very first line, followed by the above line, then to the next line add:ECHO Path has been set to <Path to your added exe>.This will remind you what is available.Leave wpeinit til the last line. It may be better to start it in a separate process so you don't need to wait for access to the cmd prompt.... something like that anyway.Regards
mdnchauhan Posted March 19, 2009 Posted March 19, 2009 In conclusion,This is just the beginning of a long road. ... ...startnet.cmd is in your mount\windows\system32The one default entry should be 'wpeinit', to initialiize PNP and Network support at startup. It can take a few moments.Add:SET PATH=%PATH%;<Path to your custom directory>If you like add:@ECHO OFFto the very first line, followed by the above line, then to the next line add:ECHO Path has been set to <Path to your added exe>.This will remind you what is available.Leave wpeinit til the last line. It may be better to start it in a separate process so you don't need to wait for access to the cmd prompt.... something like that anyway.RegardsHi I am new to winPE.I am making one application that execute on winPE to do that I make ISO image file and burn it on a CD and boot my machine with this CD.I go through following steps while making ISO: command-1: copype.cmd x86 G:\madancommand-2: imagex /mountrw G:\madan\winpe.wim 1 g:\madan\mount Now I copy myApplication.exe to g:\madan\mount\windows\System32command-3- peimg /install=winPE-HTA-Package g:\madan\mount\windowscommand-4- peimg /install=winpe-MDAC-Package g:\madan\mount\windowscommand-5- peimg /install=winpe-Scripting-Package g:\madan\mount\windowscommand-6- peimg /install=winpe-XML-Package g:\madan\mount\windowsNow I create Winpeshl.ini having following lines and paste it to g:\madan\mount\windows\syetm32\[LaunchApp]AppPath = %SYSTEMROOT%\System32\myApplication.exe[LaunchApps]command-7- peimg /prep g:\madan\mount\windows command-8- imagex /boot /compress max /capture g:\madan\mount g:\madan\boot.wim "My_Image"command-9- imagex /unmount g:\madan\mount /commit command-10- copy g:\madan\boot.wim g:\madan\ISO\sources\boot.wim command-11- oscdimg -n -bg:\madant\etfsboot.com g:\madan\ISO g:\madan\madan.isoAfter burning madan.iso on to a Cd I am able to boot the machine with this and myApplication.exe get executes. If I execute myApplication.exe in any machine that has XP or VISTA then I can easily access the share files from network or from ftp server because NETWORK connection is configured in that machine(XP or VISTA). But the same exe when get executed through above ISO then I am not able to get connected to network(LAN or ftp). That is because the NETWORK connection is not configured in WinPE iso. After some googling I got some points like there are some .inf and .sys files required for network connectivity. After executing command-2 while making ISO image file I see these in g:\madan\mount\Windows\inf(all .inf files are here) and g:\madan\mount\Windows\System32\drivers(all .sys files are here). But I do not have any idea that how can I make these files effective to my final ISO image?Should I need to execute some extra commands to do that?(Waiting for your comments)Thanks Madan Chauhan
allanf Posted March 19, 2009 Posted March 19, 2009 (edited) @mdnchauhan,Firstly, thanks for the clear details.Your command-8 seems an unnecessary step. The WinPE Users Guide describes the following:imagex /unmount c:\winpe_x86\mount /commitcopy c:\winpe_x86\winpe.wim c:\winpe_x86\ISO\sources\boot.wimThat is all that is required.However, for a more streamlined boot.wim, you can use:imagex /unmount c:\winpe_x86\mount /commitdelete the default boot.wim in: c:\winpe_x86\ISO\sources\boot.wimimagex /export c:\winpe_x86\mount\winpe.wim * c:\winpe_x86\ISO\sources\boot.wimFrom the Guide:You can also optimize an image by exporting to a new image file. When you modify an image, ImageX stores additional resource files that increase the overall size of the image. Exporting the image will remove unnecessary resource files.It is necessary to delete the existing boot.wim. Otherwise you will be adding/appending a second image to the the existing boot.wim.Secondly, do you have network connectivity at all when you boot WinPE, or are you having trouble connecting to a share? The network drivers in the WinPE image should all be installed by default. You may need to install specific device drivers for the Network Adaptors of the system on which you boot WinPE. In which case, use:peimg /inf=<path> c:\winpe_x86\mount\WindowsRegards Edited March 19, 2009 by allanf
mdnchauhan Posted March 19, 2009 Posted March 19, 2009 @mdnchauhan,Firstly, thanks for the clear details.Your command-8 seems an unnecessary step. The WinPE Users Guide describes the following:imagex /unmount c:\winpe_x86\mount /commitcopy c:\winpe_x86\winpe.wim c:\winpe_x86\ISO\sources\boot.wimThat is all that is required.However, for a more streamlined boot.wim, you can use:imagex /unmount c:\winpe_x86\mount /commitdelete the default boot.wim in: c:\winpe_x86\ISO\sources\boot.wimimagex /export c:\winpe_x86\mount\winpe.wim * c:\winpe_x86\ISO\sources\boot.wimFrom the Guide:You can also optimize an image by exporting to a new image file. When you modify an image, ImageX stores additional resource files that increase the overall size of the image. Exporting the image will remove unnecessary resource files.It is necessary to delete the existing boot.wim. Otherwise you will be adding/appending a second image to the the existing boot.wim.Secondly, do you have network connectivity at all when you boot WinPE, or are you having trouble connecting to a share? The network drivers in the WinPE image should all be installed by default. You may need to install specific device drivers for the Network Adaptors of the system on which you boot WinPE. In which case, use:peimg /inf=<path> c:\winpe_x86\mount\WindowsRegardsThanks for your support.In my application that execute on WinPE through ISO image I have a tree control in that I display all the drives name of Hard drive(like C,D,E) and "Network"(if the NETWORK is configured in that OS that I get in XP or in VISTA). But when I boot my machine with WinPE iso image all the drives of hard drive are there in the tree but "network" is not there the reason behind it (as I think) is it is not getting necessary network drivers.As you told me to install specific device drivers for the network adapter, I was trying to install these with the following command (after command-2 that I was executing before)- peimg /inf=G:\madan\mount\windows\inf\1394.inf G:\madan\mount\windowsThis command is successfully executing. I have some confusion here: 1- There are more than 20 .inf files in "G:\madan\mount\windows\inf" like 1394.inf, acpi.inf etc. Should I need to install all of these one by one?2- If yes then do I need to execute command-2(imagex /mountrw G:\madan\winpe.wim 1 G:\madan\mount) each time after installing each .inf file?Well I will try it out after your reply ThanksMadan Chauhan
Tripredacus Posted March 19, 2009 Posted March 19, 2009 Use a similar command as this:peimg /inf=G:\madan\mount\windows\inf\*.inf G:\madan\mount\windowsBut ah, you don't need your source path to be in the mount. You should import your drivers from somewhere else because it does not install all of the files. Plus now you technically have duplicate files in your ISO image. My command is like this, besides obvious drive letter difference:peimg /inf=d:\drivers\win32\*.inf c:\winpe_x86\mount\windowsNote the wildcard there. PEIMG will try to install all the INF files it can find in that folder.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now