[ncolug] Re: OT: Windows PE batch/automation

  • From: Bruce Ronk <bruce@xxxxxxxxxxxx>
  • To: "ncolug@xxxxxxxxxxxxx" <ncolug@xxxxxxxxxxxxx>
  • Date: Tue, 29 Sep 2015 22:19:02 -0400

Oh, that's even better!
If %PROCESSOR_ARCHITECTURE% == AMD64 goto label-for-64bit-setup


On Tuesday, September 29, 2015, Mike <bellyacres@xxxxxxxxx> wrote:

On 09/29/2015 09:39 PM, Bruce Ronk wrote:

Not sure about the WinPE environment, but Win XP+ has the 'systeminfo'
command. In the output search for "System type:" and get a line that
includes "x64-based PC" or "X86-based PC".

ie: systeminfo | find "System Type:" > cpu.info

It also has a "Processor(s):" section, that can report "X86 Family ..." or
"Intel64 Family ..." or some such. You may be able to branch on those
results.

Bruce

On Tue, Sep 29, 2015 at 9:12 PM, Mike <bellyacres@xxxxxxxxx
<javascript:_e(%7B%7D,'cvml','bellyacres@xxxxxxxxx');>> wrote:

Evening all,

My brain is kinda mushy right now, and google fu must be really weak
right now.

I'm trying to determine if I can get arch info via a batch script or some
other mechanism that is available in a PE environment.
I can add to the PE if necessary, ultimately the goal is to just have the
generic PE do what I need without having to customize it too much.

The end goal is close... I'm pxe booting machines, using ipxe, with http
for transfer, starting a Windows install with a somewhat custom
autounattend.xml file. The install(s) use a install.wim file that contains
all current SP, etc. This allows me to install a machine, and not have to
spend 2 days playing the Windows update game. Probably the biggest win out
of all this is that other than setting up reference machines, it's all done
with Open Source tools. Well, Okay technically the xml file was originally
created between WAIK, and an online tool, then tweaked by hand. All the
reference machines are VMs.

Having rambled on about that... The answer I'm seeking is how to
determine whether I want to install x86 or x64 without user intervention.
Most of the hardware is x64, but not all of it. Can I do this easily?

Mike

To unsubscribe send to ncolug-request@xxxxxxxxxxxxx
<javascript:_e(%7B%7D,'cvml','ncolug-request@xxxxxxxxxxxxx');> with
'unsubscribe' in the Subject field.


Okay, that got me closer! Sadly systeminfo isn't available in the PE
environment. Just had to dig a bit deeper into the cranium...

set
reveals %PROCESSOR_ARCHITECTURE=AMD64 -- Atleast on this VM setup.

echo %PROCESSOR_ARCHITECTURE%

That will/should give me enough to hack on. I've forgotten how brain dead
batch is...

Thanks Bruce!

Mike

Other related posts: