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

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



LVL 3
TraJohnsonAsked:
Who is Participating?
 
TraJohnsonAuthor Commented:
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
 
TraJohnsonAuthor Commented:
Figured it out myself.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.