::::::::: PowerShell :::::::::
Thursday, November 30, 2006
  Installing PowerShell with Unattended Windows CD
Here are some steps to include Windows PowerShell(for English Version of Windows XP w/ SP2) in an unattended Windows CD.

First,
I have copied Windows CD content to "C:\xpcd"
Windows PowerShell installation file, WindowsXP-KB926139-x86-ENU.exe, has been copied over to C:\xpcd\$OEM$\$1\install\applications\

  1. Create a batch file, install_applications.cmd (just name it to anything with .bat or .cmd extension) at C:\xpcd\$OEM$\$1\install
  2. Open up Winnt.sif and create a [GuiRunOnce] section and call the batch file created in the previous step.
  3. Simply call PowerShell installation file with silent setup switches in the batch file

Winnt.Sif:
[GuiRunOnce]
%systemdrive%\install\install_applications.cmd
install_applications.cmd:
... other application installation statements...
...
ECHO.
ECHO Installing PowerShell
ECHO Please wait...
start /wait %systemdrive%\install\applications\WindowsXP-KB926139-x86-ENU.exe /quiet /passive /norestart
exit

Yes... Now I have a Windows XP CD with Windows PowerShell.
I have installed Windows XP and saw other applications (WinZip, IrfanView, etc...) being installed.
Since PowerShell was to be installed in a silent mode, I didn't expect to see anything happening.
But 10 minutes later, PowerShell wasn't still installed.

Oh yes. I have forgotten to include .NET Framework 2.0 onto the CD...
Well, download .NET 2.0 redistributable(i have placed the installation file under C:\xpcd\$OEM$\$1\install\applications\DotNet\2\dotnetfx.exe).
And you must include the following script BEFORE installing PowerShell so that the result is

install_applications.cmd:
ECHO.
ECHO Installing .NET Framework 2.0
ECHO Please wait...
start /wait %systemdrive%\install\applications\DotNet\2\dotnetfx.exe /q:a /c:"install.exe /qb"

ECHO.
ECHO Installing PowerShell
ECHO Please wait...
start /wait %systemdrive%\install\applications\WindowsXP-KB926139-x86-ENU.exe /quiet /passive /norestart

Now PowerShell should install without a problem...


References:
Tags :
 
Comments:
Maybe you should read this post and related comment: http://blogs.msdn.com/powershell/archive/2006/05/30/611182.aspx
 
Thank you.
 
Post a Comment

Links to this post:

Create a Link



<< Home
Let's get lazy with PowerShell!

Name:
Location: Flushing, NY, United States

Experimenting with a different format of blogs...

Links
ARCHIVES
10/01/2005 - 11/01/2005 / 11/01/2005 - 12/01/2005 / 12/01/2005 - 01/01/2006 / 01/01/2006 - 02/01/2006 / 02/01/2006 - 03/01/2006 / 03/01/2006 - 04/01/2006 / 04/01/2006 - 05/01/2006 / 05/01/2006 - 06/01/2006 / 06/01/2006 - 07/01/2006 / 07/01/2006 - 08/01/2006 / 08/01/2006 - 09/01/2006 / 10/01/2006 - 11/01/2006 / 11/01/2006 - 12/01/2006 /


Powered by Blogger