On Wed, Jun 23, 2010 at 7:29 PM, Jake Adams <jada...@cs.byu.edu> wrote:

>
> Greetings, all!  I am on my way to a working automated install of
> Windows 7.  I have got all of the OS installation via network automated
> but have not yet attempted to get the post-install todo.pl stuff
> working.
>

For my first try at Windows 7, I skipped all of the PXE stuff, since I
didn't have that set up yet, and just built an unattended.xml file that
would execute my unattended install after windows was done.

I created a boot USB drive to install Win7, create my unattended.xml and add
it to the root of the USB drive.

Unattended.xml auto-logons as Administrator, then runs the following:

<FirstLogonCommands>
   <SynchronousCommand wcm:action="add">
      <Order>1</Order>
      <Description>Running appsonly</Description>
      <CommandLine>cmd /C start /wait net use Z: ***install.share***
***install.user.password*** /user:***domain***\***.install.user.name
***</CommandLine>
   </SynchronousCommand>
   <SynchronousCommand wcm:action="add">
      <Order>2</Order>
      <Description>Running appsonly</Description>
      <CommandLine>cmd /C z:\bin\pre1.bat</CommandLine>
   </SynchronousCommand>
   <SynchronousCommand wcm:action="add">
      <Order>3</Order>
      <Description>Running appsonly</Description>
      <CommandLine>cmd /C Z:\scripts\perl.bat</CommandLine>
   </SynchronousCommand>
   <SynchronousCommand wcm:action="add">
       <Order>4</Order>
       <Description>Running appsonly</Description>
       <CommandLine>cmd /C z:\bin\pre2.bat</CommandLine>
   </SynchronousCommand>
   <SynchronousCommand wcm:action="add">
       <Order>5</Order>
       <Description>Running appsonly</Description>
       <CommandLine>cmd /C
z:\bin\todo.pl***master.install.script***</CommandLine>
   </SynchronousCommand>
   <SynchronousCommand wcm:action="add">
       <Order>6</Order>
       <Description>Running appsonly</Description>
       <CommandLine>cmd /C z:\bin\post.bat</CommandLine>
   </SynchronousCommand>
</FirstLogonCommands>

This is basically what the normal install does, except I eneded up breaking
it into several chunks, the pre and post bat files.  There is probably a
more concise way to do it.  Also, you can see where I substitute variables
into XML.

pre1.bat:

set z=z:
if not exist %SystemDrive%\netinst md %SystemDrive%\netinst
if not exist %SystemDrive%\netinst\logs md %SystemDrive%\netinst\logs
if exist %z%\bin\permcred.bat copy %z%\bin\permcred.bat
%SystemDrive%\netinst
if exist %z%\bin\tempcred.bat copy %z%\bin\tempcred.bat
%SystemDrive%\netinst
copy %Z%\bin\mapznrun.bat %SystemDrive%\netinst\mapznrun.bat
copy %Z%\bin\mapcd.js %SystemDrive%\netinst\mapcd.js

pre2.bat

set z=z:
set PATH=%Z%\bin;%PATH%
todo.pl .reboot
todo.pl "autolog.pl --logon=0"
todo.pl "del %SystemDrive%\netinst\tempcred.bat"
todo.pl "srconfig.pl --enable"

post.bat

set z=z:
set PATH=%Z%\bin;%PATH%
todo.pl "srconfig.pl --disable"
rem todo.pl hide.pl bootini.pl fixtz.pl
todo.pl --go


Hope this helps,

Doug
------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate 
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the 
lucky parental unit.  See the prize list and enter to win: 
http://p.sf.net/sfu/thinkgeek-promo
_______________________________________________
unattended-info mailing list
unattended-info@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/unattended-info

Reply via email to