?
Solved

Using unattend.xml answer file to install IIS during Sysprep.

Posted on 2011-05-13
2
Medium Priority
?
2,719 Views
Last Modified: 2012-05-11
I think this should be easy to accomplish but I haven't been able to make it work.  Previously my master VMs that I capture the Windows 7 images out of had IIS installed on them prior to Sysprep and deployment but the default profile was not being created.  I finally figured out that IIS being pre-installed is why the copy profile option wasn't working for me.  If anyone wants to know about that just ask.  I uninstalled IIS from the master image and configured my answer file to install it during sysprep (copy profile works once the iis user profile was deleted).  That didn't work on the old image so I figured it was because IIS was formerly present.  No big deal I created a fresh Windows 7 Pro x86 image that IIS has never been installed on.  I installed no updates, no special software, basically nothing on the VM and syspreped it with my new answer file.

After the reboot everything from my answer file works fine but IIS is not installed.  I've looked at the log files in C:\windows\panther and C:\Windows\System32\sysprep and I don't see anything about IIS being installed, or failing.

Have any of you made this work before?  Or is there maybe another log file somewhere I'm not looking at?  This is the packages section of my answer file that the AIK creates.

<servicing>
        <package action="configure">
            <assemblyIdentity name="Microsoft-Windows-Foundation-Package" version="6.1.7600.16385" processorArchitecture="x86" publicKeyToken="31bf3856ad364e35" language="" />
            <selection name="IIS-WebServerRole" state="true" />
            <selection name="IIS-ManagementConsole" state="true" />
            <selection name="IIS-ApplicationDevelopment" state="true" />
            <selection name="IIS-NetFxExtensibility" state="true" />
            <selection name="IIS-ASPNET" state="true" />
            <selection name="IIS-ISAPIExtensions" state="true" />
            <selection name="IIS-ISAPIFilter" state="true" />
            <selection name="IIS-DefaultDocument" state="true" />
            <selection name="IIS-CommonHttpFeatures" state="true" />
            <selection name="IIS-DirectoryBrowsing" state="true" />
            <selection name="IIS-HttpErrors" state="true" />
            <selection name="IIS-StaticContent" state="true" />
            <selection name="IIS-HealthAndDiagnostics" state="true" />
            <selection name="IIS-HttpLogging" state="true" />
            <selection name="IIS-RequestMonitor" state="true" />
            <selection name="IIS-HttpCompressionStatic" state="true" />
            <selection name="IIS-RequestFiltering" state="true" />
            <selection name="IIS-ManagementScriptingTools" state="true" />
            <selection name="IIS-ManagementService" state="true" />
            <selection name="IIS-ASP" state="true" />
            <selection name="IIS-CGI" state="true" />
            <selection name="MSMQ-HTTP" state="true" />
            <selection name="WCF-HTTP-Activation" state="true" />
            <selection name="IIS-WebServer" state="true" />
            <selection name="IIS-WebServerManagementTools" state="true" />
            <selection name="IIS-HostableWebCore" state="false" />
            <selection name="IIS-Security" state="true" />
            <selection name="IIS-Performance" state="true" />
            <selection name="IIS-HttpRedirect" state="true" />
            <selection name="IIS-HttpTracing" state="true" />
            <selection name="IIS-LoggingLibraries" state="true" />
            <selection name="IIS-IIS6ManagementCompatibility" state="true" />
            <selection name="IIS-Metabase" state="true" />
            <selection name="MSMQ-Container" state="true" />
            <selection name="MSMQ-Server" state="true" />
            <selection name="NetFx3" state="true" />
            <selection name="WAS-WindowsActivationService" state="true" />
            <selection name="WAS-ConfigurationAPI" state="true" />
            <selection name="WAS-NetFxEnvironment" state="true" />
            <selection name="WAS-ProcessModel" state="true" />
        </package>
    </servicing>

I can do it from a command line and am thinking about adding it to my scripts file but sysprep should do it for me.

FYI you can run this command to preform a default installation of IIS from the command line.

START /WAIT DISM /Online /Enable-Feature /FeatureName:IIS-ApplicationDevelopment /FeatureName:IIS-ASPNET /FeatureName:IIS-CommonHttpFeatures /FeatureName:IIS-DefaultDocument /FeatureName:IIS-DirectoryBrowsing /FeatureName:IIS-HealthAndDiagnostics /FeatureName:IIS-HttpCompressionStatic /FeatureName:IIS-HttpErrors /FeatureName:IIS-HttpLogging /FeatureName:IIS-ISAPIExtensions /FeatureName:IIS-ISAPIFilter /FeatureName:IIS-ManagementConsole /FeatureName:IIS-NetFxExtensibility /FeatureName:IIS-Performance /FeatureName:IIS-RequestFiltering /FeatureName:IIS-RequestMonitor /FeatureName:IIS-Security /FeatureName:IIS-StaticContent



0
Comment
Question by:TraJohnson
  • 2
2 Comments
 
LVL 3

Accepted Solution

by:
TraJohnson earned 0 total points
ID: 35762393
The command I posted originally wasn't my working one, here you all go.  I added a line to my setupcomplete.cmd to call a .bat with this command in it and IIS installs fine at the first boot after deployment.

START /WAIT DISM /Online /Enable-Feature /FeatureName:IIS-WebServerRole /FeatureName:IIS-WebServer /FeatureName:IIS-CommonHttpFeatures /FeatureName:IIS-HttpErrors /FeatureName:IIS-ApplicationDevelopment /FeatureName:IIS-Security /FeatureName:IIS-RequestFiltering /FeatureName:IIS-NetFxExtensibility /FeatureName:IIS-HealthAndDiagnostics /FeatureName:IIS-HttpLogging /FeatureName:IIS-RequestMonitor /FeatureName:IIS-Performance /FeatureName:IIS-WebServerManagementTools /FeatureName:IIS-ISAPIExtensions /FeatureName:IIS-ISAPIFilter /FeatureName:IIS-StaticContent /FeatureName:IIS-DefaultDocument /FeatureName:IIS-DirectoryBrowsing /FeatureName:IIS-ASPNET /FeatureName:IIS-HttpCompressionStatic /FeatureName:IIS-ManagementConsole


0
 
LVL 3

Author Closing Comment

by:TraJohnson
ID: 35762396
Figured it out myself.
0

Featured Post

NFR key for Veeam Agent for Linux

Veeam is happy to provide a free NFR license for one year.  It allows for the non‑production use and valid for five workstations and two servers. Veeam Agent for Linux is a simple backup tool for your Linux installations, both on‑premises and in the public cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

While working, an annoying popup showing below will come and we cannot cancel or close it form the screen. The error message will come again and again.
For anyone that has accidentally used newSID with Server 2008 R2 (like I did) and hasn't been able to get the server running again because you were unlucky (as I was) and had no backups - I was able to get things working by doing a Registry Hive rec…
This Micro Tutorial will teach you how to change your appearance and customize your Windows 7 interface to your unique preference. This will be demonstrated using Windows 7 operating system.
There are cases when e.g. an IT administrator wants to have full access and view into selected mailboxes on Exchange server, directly from his own email account in Outlook or Outlook Web Access. This proves useful when for example administrator want…
Suggested Courses

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question