Post Reply 
 
Thread Rating:
  • 1 Vote(s) - 4 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Passing parameters to WinPE
2013-05-02, 08:45
Post: #1
Passing parameters to WinPE
Hi,

I'm booting a winPE with this script (which is working perfectly fine) but I would like to pass a parameter that I can retreive from the PE when it is booted.

Is there a way to do that ?

Code:
#!gpxe
kernel http://srv1/winpe/wimboot
initrd http://srv1/winpe/media/bootmgr bootmgr
initrd http://srv1/winpe/media/Boot/BCD BCD
initrd http://srv1/winpe/media/Boot/Fonts/segmono_boot.ttf segmono_boot.ttf
initrd http://srv1/winpe/media/Boot/Fonts/segoe_slboot.ttf segoe_slboot.ttf
initrd http://srv1/winpe/media/Boot/Fonts/wgl4_boot.ttf wgl4_boot.ttf
initrd http://srv1/winpe/media/Boot/boot.sdi boot.sdi
initrd http://srv1/winpe/media/sources/boot.wim boot.wim
boot

Thank you
Find all posts by this user
Quote this message in a reply
2013-05-02, 10:51
Post: #2
RE: Passing parameters to WinPE
(2013-05-02 08:45)Kirioss Wrote:  
Code:
#!gpxe

Should be "#!ipxe". I assume you're using iPXE rather than gPXE; if not, then the first thing you should do is upgrade to iPXE.

Quote:I'm booting a winPE with this script (which is working perfectly fine) but I would like to pass a parameter that I can retreive from the PE when it is booted.
Is there a way to do that ?

No way that immediately springs to mind. You could potentially use imagex or wimlib on the server side to modify the .wim image at the point of serving it up.

It might be simpler to include code within your .wim to retrieve the dynamic parameters over the network after WinPE starts up, rather than trying to pass a parameter via the WinPE boot mechanism.

Michael
Visit this user's website Find all posts by this user
Quote this message in a reply
2013-05-02, 11:19
Post: #3
RE: Passing parameters to WinPE
Of course I use ipxe, this is a mistake in my script (but the script is working...)

The parameter I want to pass is "srv1" if the wim file is booted from srv1. srv1 is dynamically calculated before the ipxe script is generated, and can be any other server that is better for the client. I would like to avoid having to recalculate it in the wim.

Thank you for your anwser
Find all posts by this user
Quote this message in a reply
2013-05-02, 12:21
Post: #4
RE: Passing parameters to WinPE
(2013-05-02 11:19)Kirioss Wrote:  The parameter I want to pass is "srv1" if the wim file is booted from srv1. srv1 is dynamically calculated before the ipxe script is generated, and can be any other server that is better for the client. I would like to avoid having to recalculate it in the wim.

I don't think the WinPE boot process allows any sensible way to pass in parameters. You would have to modify either BCD, boot.sdi, or boot.wim.

As I said before, it might be simpler to implement the relevant parameter discovery process entirely within WinPE rather than attempting to pass parameters directly via the boot process.

Michael
Visit this user's website Find all posts by this user
Quote this message in a reply
2013-05-02, 22:09
Post: #5
RE: Passing parameters to WinPE
If you were using PHP or ASP to create the iPXE boot script you could have it create a file with the information that winpe would then be able to get to.
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)