MSFN Forum: Winpeshl.ini Assistance - MSFN Forum

Jump to content



Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Winpeshl.ini Assistance Rate Topic: -----

#1 User is offline   Eagle710 

  • Member
  • PipPip
  • Group: Members
  • Posts: 159
  • Joined: 06-November 08

Posted 12 March 2010 - 01:11 PM

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.xml

My WINPESHL.ini file for simplicity looks like this:
[LAUNCHAPPS]
x:\windows\system32\startnet.cmd
x:\windows\system32\wpeinit.exe, /unattend=X:\Windows\Displaychange.xml
x:\windows\system32\cmd.exe


I 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?

This post has been edited by Eagle710: 12 March 2010 - 09:29 PM



#2 User is offline   chantszhim 

  • Newbie
  • Group: Members
  • Posts: 14
  • Joined: 12-November 03

Posted 13 March 2010 - 07:53 AM

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

#3 User is offline   Eagle710 

  • Member
  • PipPip
  • Group: Members
  • Posts: 159
  • Joined: 06-November 08

Posted 13 March 2010 - 10:32 AM

View Postchantszhim, on 13 March 2010 - 07:53 AM, said:

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


So place unattend in the root of the wim as in X:\unattend.xml?

and in winpeshl.ini is just -unattend not unattend.xml?

#4 User is offline   Tripredacus 

  • K-Mart-ian Legend
  • Group: Super Moderator
  • Posts: 6,988
  • Joined: 28-April 06
  • OS:Windows 7 x86
  • Country: Country Flag

Posted 13 March 2010 - 06:19 PM

You have a syntax error. Try this:

[LAUNCHAPPS]
x:\windows\system32\startnet.cmd
x:\windows\system32\wpeinit.exe, "/unattend=X:\Windows\Displaychange.xml"
x:\windows\system32\cmd.exe


Notice the quotes I added. winpeshl requires quotes after the comma. Another example here:
http://www.passmark....183&postcount=7

#5 User is offline   chantszhim 

  • Newbie
  • Group: Members
  • Posts: 14
  • Joined: 12-November 03

Posted 14 March 2010 - 10:54 AM

View PostEagle710, on 13 March 2010 - 10:32 AM, said:

View Postchantszhim, on 13 March 2010 - 07:53 AM, said:

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


So 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

#6 User is offline   Eagle710 

  • Member
  • PipPip
  • Group: Members
  • Posts: 159
  • Joined: 06-November 08

Posted 16 March 2010 - 06:44 AM

View PostTripredacus, on 13 March 2010 - 06:19 PM, said:

You have a syntax error. Try this:

[LAUNCHAPPS]
x:\windows\system32\startnet.cmd
x:\windows\system32\wpeinit.exe, "/unattend=X:\Windows\Displaychange.xml"
x:\windows\system32\cmd.exe


Notice the quotes I added. winpeshl requires quotes after the comma. Another example here:
http://www.passmark....183&postcount=7


Tripredacus,

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

#7 User is offline   Tripredacus 

  • K-Mart-ian Legend
  • Group: Super Moderator
  • Posts: 6,988
  • Joined: 28-April 06
  • OS:Windows 7 x86
  • Country: Country Flag

Posted 16 March 2010 - 08:46 AM

Ha ha Eagle, it was in the documentation! However, I also did it wrong the first time too before I found it. :lol:

#8 User is offline   Eagle710 

  • Member
  • PipPip
  • Group: Members
  • Posts: 159
  • Joined: 06-November 08

Posted 18 March 2010 - 01:24 PM

The documentation doesnt say anything about quotes..... for anything following the comma I suppose we have to do that...
WinPESHL Info

Is it correct that in order to include multiple option with a command to use quotes around the whole command and options?

#9 User is offline   Tripredacus 

  • K-Mart-ian Legend
  • Group: Super Moderator
  • Posts: 6,988
  • Joined: 28-April 06
  • OS:Windows 7 x86
  • Country: Country Flag

Posted 18 March 2010 - 10:03 PM

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.

#10 User is offline   Eagle710 

  • Member
  • PipPip
  • Group: Members
  • Posts: 159
  • Joined: 06-November 08

Posted 19 March 2010 - 09:34 AM

OK sounds good... is that just the documentation that comes with WAIK?

#11 User is offline   Tripredacus 

  • K-Mart-ian Legend
  • Group: Super Moderator
  • Posts: 6,988
  • Joined: 28-April 06
  • OS:Windows 7 x86
  • Country: Country Flag

Posted 19 March 2010 - 09:48 AM

View PostEagle710, on 19 March 2010 - 09:34 AM, said:

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. :whistle:

I remember reading it in WAIK for Vista before I had to stop using it.

#12 User is offline   Eagle710 

  • Member
  • PipPip
  • Group: Members
  • Posts: 159
  • Joined: 06-November 08

Posted 07 April 2010 - 08:26 AM

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?

#13 User is offline   Tripredacus 

  • K-Mart-ian Legend
  • Group: Super Moderator
  • Posts: 6,988
  • Joined: 28-April 06
  • OS:Windows 7 x86
  • Country: Country Flag

Posted 07 April 2010 - 08:33 AM

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.

#14 User is offline   Eagle710 

  • Member
  • PipPip
  • Group: Members
  • Posts: 159
  • Joined: 06-November 08

Posted 07 April 2010 - 08:36 AM

View PostTripredacus, on 07 April 2010 - 08:33 AM, said:

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?

#15 User is offline   Tripredacus 

  • K-Mart-ian Legend
  • Group: Super Moderator
  • Posts: 6,988
  • Joined: 28-April 06
  • OS:Windows 7 x86
  • Country: Country Flag

Posted 07 April 2010 - 10:28 AM

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.

#16 User is offline   Eagle710 

  • Member
  • PipPip
  • Group: Members
  • Posts: 159
  • Joined: 06-November 08

Posted 07 April 2010 - 10:34 AM

It appears not to like the > the X:\Windows\winpeshl.log file indicates that it runs properly but only interprets up until just after the > . I have placed my diskpart command in a cmd and called that from winpeshl and it worked great. But I didnt want that middle man but who cares I suppose.

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users



All trademarks mentioned on this page are the property of their respective owners
Copyright © 2001 - 2011 msfn.org
Privacy Policy