Eagle710 Posted March 12, 2010 Posted March 12, 2010 (edited) I have an xml file that I call using wpeinit ro change the resolution of my WinPE. However, running the command through winpeshl.ini doesn't work. Any Ideas?Here are the files/commands:I have the following file DisplayChange.xml which contains the following:<?xml version="1.0" encoding="utf-8"?><unattend xmlns="urn:schemas-microsoft-com:unattend"> <settings pass="windowsPE"> <component name="Microsoft-Windows-Setup" processorArchitecture="x86"publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State"xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <Display> <ColorDepth>32</ColorDepth> <HorizontalResolution>1024</HorizontalResolution> <VerticalResolution>768</VerticalResolution> </Display> <EnableNetwork>true</EnableNetwork> <EnableFirewall>true</EnableFirewall> <PageFile> <Path>C:\Pagefile.sys</Path> <Size>1024</Size> </PageFile> </component> </settings></unattend>And I would like to run the following command from within the Winpeshl.ini file:wpeinit.exe, /unattend=X:\Windows\Displaychange.xmlMy WINPESHL.ini file for simplicity looks like this:[LAUNCHAPPS]x:\windows\system32\startnet.cmdx:\windows\system32\wpeinit.exe, /unattend=X:\Windows\Displaychange.xmlx:\windows\system32\cmd.exeI have tried switching the order of the wpeinit command and there is no difference. However, if I run the command by itself from a command prompt it works and therefore changes the display. Any idea why this is happening? Edited March 13, 2010 by Eagle710
chantszhim Posted March 13, 2010 Posted March 13, 2010 Change the Displaychange.xml filename to Unattend.xml and save it in the Root of the Wim Image, then change the command in Winpeshl.ini to x:\windows\system32\wpeinit.exe,-unattend
Eagle710 Posted March 13, 2010 Author Posted March 13, 2010 Change the Displaychange.xml filename to Unattend.xml and save it in the Root of the Wim Image, then change the command in Winpeshl.ini to x:\windows\system32\wpeinit.exe,-unattendSo place unattend in the root of the wim as in X:\unattend.xml? and in winpeshl.ini is just -unattend not unattend.xml?
Tripredacus Posted March 14, 2010 Posted March 14, 2010 You have a syntax error. Try this:[LAUNCHAPPS]x:\windows\system32\startnet.cmdx:\windows\system32\wpeinit.exe, "/unattend=X:\Windows\Displaychange.xml"x:\windows\system32\cmd.exeNotice the quotes I added. winpeshl requires quotes after the comma. Another example here:http://www.passmark.com/forum/showpost.php?p=7183&postcount=7
chantszhim Posted March 14, 2010 Posted March 14, 2010 Change the Displaychange.xml filename to Unattend.xml and save it in the Root of the Wim Image, then change the command in Winpeshl.ini to x:\windows\system32\wpeinit.exe,-unattendSo place unattend in the root of the wim as in X:\unattend.xml? and in winpeshl.ini is just -unattend not unattend.xml?Yes, no need to specify the filename if the file is placed in Root
Eagle710 Posted March 16, 2010 Author Posted March 16, 2010 You have a syntax error. Try this:[LAUNCHAPPS]x:\windows\system32\startnet.cmdx:\windows\system32\wpeinit.exe, "/unattend=X:\Windows\Displaychange.xml"x:\windows\system32\cmd.exeNotice the quotes I added. winpeshl requires quotes after the comma. Another example here:http://www.passmark.com/forum/showpost.php?p=7183&postcount=7Tripredacus,The quotes worked great and my issue is resolved. How did you determine you needed the quotes? It drove me nuts.Thanks for your help.Eagle710
Tripredacus Posted March 16, 2010 Posted March 16, 2010 Ha ha Eagle, it was in the documentation! However, I also did it wrong the first time too before I found it.
Eagle710 Posted March 18, 2010 Author Posted March 18, 2010 The documentation doesnt say anything about quotes..... for anything following the comma I suppose we have to do that...WinPESHL InfoIs it correct that in order to include multiple option with a command to use quotes around the whole command and options?
Tripredacus Posted March 19, 2010 Posted March 19, 2010 Yes you need full quotes. If I remember (today was an insane day) I will report this error to my TAM. Anyways, a disclaimer, I do not use Technet or the WAIK documentation, I only use the OPK documentation.
Eagle710 Posted March 19, 2010 Author Posted March 19, 2010 OK sounds good... is that just the documentation that comes with WAIK?
Tripredacus Posted March 19, 2010 Posted March 19, 2010 OK sounds good... is that just the documentation that comes with WAIK?Well I typically do not use the info on Technet. I just read the CHMs that are part of the install. But sometimes I will post a link to Technet because I can't post the info from the OPK CHMs, there is a little difference. I remember reading it in WAIK for Vista before I had to stop using it.
Eagle710 Posted April 7, 2010 Author Posted April 7, 2010 Now what if I want to have a command run like this:X:\Windows\system32\diskpart.exe, "/s X:\Windows\system32\script.txt > X:\Windows\temp.log"I want to run the diskpart script and redirect the output to a file. Do I really have to make another file that will act as the middle man and store this entire command and call that one cmd/batch from within WinPESHL?
Tripredacus Posted April 7, 2010 Posted April 7, 2010 Is this related to you trying to detect a USB Drive? There is always another way, but this method would work. The only difference is that you are going to need to put in a sleep type command, so that the next part of your script does not try to read the log file before it exists, or is done being saved, etc.
Eagle710 Posted April 7, 2010 Author Posted April 7, 2010 Is this related to you trying to detect a USB Drive? There is always another way, but this method would work. The only difference is that you are going to need to put in a sleep type command, so that the next part of your script does not try to read the log file before it exists, or is done being saved, etc.Right now I would like the file created and thats it....no sleep needed.... but the command i put above doesnt work in winpeshl.ini..any ideas why?
Tripredacus Posted April 7, 2010 Posted April 7, 2010 I am wondering if winpeshl.ini does not like the > character. Try having winpeshl.ini run a .cmd file instead, and put your diskpart command in that file instead. Make sure you don't make it exit, or have winpeshl.ini run something after the .cmd so the PE doesn't exit and reboot on you, like have it open notepad after it runs the script, so then you can check it.
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now