locked
Windows 7 SteadyState Solution updated! RRS feed

  • General discussion

  • Hi all,

    I have updated my Windows 7 SteadyState solution based on differencing VHDs and the "Boot from VHD" feature.

    The updated solution is now fully automated based on scripts, MDT and WAIK.

    You simply run a setup file which creates a bootable ISO which, in turn, can be used to fully deploy Windows 7 in a "SteadyState" condition.

    The solution is simple to install, clean and highly customizable.

    Downloads and a step-by-step guide can be found at my blog here: http://blogs.technet.com/b/panosm/archive/2011/07/07/windows-7-steadystate-solution-simplified.aspx

    Looking forward to getting feedback from the SteadyState community.

    Panos Macheras
    Microsoft Infrastructure Consultant



    Thursday, July 7, 2011 6:55 PM

All replies

  • Thanks for this, but I get an error every time!

     

    Line 37 (File "c:\Steadystate\setup.exe"):

    Error: Subscrip used with non-Array variable.

     

    Please help!?

     

     

    Monday, July 11, 2011 2:48 AM
  • First of all, thanks for trying the solution!

     

    When you get this message, please verify that the following file exists:

    c:\DeploymentShare\Control\OperatingSystems.xml

     

    If it does, post its contents here to investigate further.

     

    Thanks,

    Panos.

     

     

    Monday, July 11, 2011 6:14 AM
  • Hi Panos,

     

    Yes the file exists, but it is empty

     

    Thanks

    Brendan

    Monday, July 11, 2011 9:37 PM
  • Hi Brendan,

    This probably means that the OS import failed for some reason.

    Did you copy-pasted the Windows 7 DVD media to the WIN7CD folder (as described in Step 4)?

    You should have something like this:

    http://blogs.technet.com/cfs-filesystemfile.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-86-89-metablogapi/8712.image_5F00_47F231D4.png

    Please verify this and let me know.

    Thanks,

    Panos.

    Monday, July 11, 2011 9:47 PM

  • Yes, I sure did, and the folder structure is the same as the linked image
    Monday, July 11, 2011 10:06 PM
  • I am using Win7 with SP1, would this be an issue?
    Monday, July 11, 2011 10:09 PM
  • Win7 with SP1 should work just fine (I have tried it).

    For some reason the import of the OS files is failing. 

    We need to have the output of the powershell script that does the import (ImportOS.ps1).

     

    Re-run the procedure and when you get the error go and right-click the ImportOS.ps1 file and select "Edit".

    This should take you to powershell_ise (the IDE for Powershell in Win7).

    Select "File" -> "Run".

    You should be able to see the output of the command. Please provide this for further investigation.

     

    Thanks.

    Panos.

    Monday, July 11, 2011 10:41 PM
  • when running through powershell_ise i get

    PS C:\SteadyState> C:\SteadyState\ImportOS.ps1
    File C:\SteadyState\ImportOS.ps1 cannot be loaded. The file C:\SteadyState\ImportOS.ps1 is not digitally signed. The script will not execute on the system. Please see "get-
    help about_signing" for more details..
    At line:0 char:0

     

    But if i do a copy paste into Powershell, i get

    PS C:\Windows\system32> Import-mdtoperatingsystem -path "DS001:\Operating Systems" -SourcePath ".\WIN7CD" -DestinationFo
    lder "Windows 7" -Verbose
    Import-MDTOperatingSystem : Cannot bind parameter 'Path' to the target. Exception setting "Path": "Cannot find path 'DS
    001:\Operating Systems' because it does not exist."
    At line:1 char:32
    + Import-mdtoperatingsystem -path <<<<  "DS001:\Operating Systems" -SourcePath ".\WIN7CD" -DestinationFolder "Windows 7
    " -Verbose
        + CategoryInfo          : WriteError: (:) [Import-MDTOperatingSystem], ParameterBindingException
        + FullyQualifiedErrorId : ParameterBindingFailed,Microsoft.BDD.PSSnapIn.ImportOperatingSystem


    Monday, July 11, 2011 10:54 PM
  • So what I have done is opened each .ps1 script, made a change and reversed it and resaved.

    This seems to have got around the signing issue and it looks like it is running. (i had to do it for each file)

     

    Thanks for your help. im not sure if anyone else will have the same issue, but its a fairly quick fix


    Monday, July 11, 2011 11:10 PM
  • Open powershell as an administrator and run the following command:

    set-executionpolicy remotesigned

    Answer "Y" to the Execution Policy Change question.

    Close Powershell.

    Re-run the procedure (by running SETUP.exe).

     

    Panos.

    Monday, July 11, 2011 11:11 PM
  • So what I have done is opened each .ps1 script, made a change and reversed it and resaved.

    This seems to have got around the signing issue and it looks like it is running. (i had to do it for each file)

     

    Thanks for your help. im not sure if anyone else will have the same issue, but its a fairly quick fix


    Please see my post about the "set-executionpolicy" command.

    It seems that for some reason the execution policy in Powershell was not set by the script (setup.exe should do this automatically).

    I will update the blog post to recommend a manual run of the "set-exeutionpolicy remotesigned" command (which is the one needed to run "unsigned" powershell script like the ones I am having in the solution). This will hopefully mitigate the issue once and for all.

    Panos.

    Monday, July 11, 2011 11:17 PM
  • Open powershell as an administrator and run the following command:

    set-executionpolicy remotesigned

    Answer "Y" to the Execution Policy Change question.

    Close Powershell.

    Re-run the procedure (by running SETUP.exe).

     

    Panos.

    This is what i tried first, and it didn't work. So I tried the editing...
    Monday, July 11, 2011 11:33 PM
  • Open powershell as an administrator and run the following command:

    set-executionpolicy remotesigned

    Answer "Y" to the Execution Policy Change question.

    Close Powershell.

    Re-run the procedure (by running SETUP.exe).

     

    Panos.

    This is what i tried first, and it didn't work. So I tried the editing...

    Then maybe "set-executionpolicy unrestricted" could do the trick.

    Panos.

    Monday, July 11, 2011 11:42 PM

  • Hi all,

    I have updated my Windows 7 SteadyState solution based on differencing VHDs and the "Boot from VHD" feature.

    The updated solution is now fully automated based on scripts, MDT and WAIK.

    You simply run a setup file which creates a bootable ISO which, in turn, can be used to fully deploy Windows 7 in a "SteadyState" condition.

    The solution is simple to install, clean and highly customizable.

    Downloads and a step-by-step guide can be found at my blog here: http://blogs.technet.com/b/panosm/archive/2011/07/07/windows-7-steadystate-solution-simplified.aspx

    Looking forward to getting feedback from the SteadyState community.

    Panos Macheras
    Microsoft Infrastructure Consultant



    Two important notes have been added to the Blog Post:

    1. One is which specific media will work with the solution. Only Windows 7 Ultimate and Windows 7 Enterprise editions will work (x64 or x86). Other editions or multi-editions DVDs (media which included all editions of Win7) will NOT work.

    2. Added note about Powershell set-executionpolicy.

    Panos.

    Friday, July 15, 2011 8:32 AM
  • I am seeing the same error message: Line 37 (File "c:\SteadyState\setup.exe").  I too checked the OperatingSystems.xml and it was empty.  I check the ImportOS.ps1 and it stated that ImportOS.ps1 is not digitally signed.  I ran all the commands in powershell:  set-executionpolicy remotesigned, set-executionpolicy unrestricted and set-executionpolicy allsigned.  Nothing helped....still the same Line 37 error message.

    Brian

     

     

    Thursday, August 25, 2011 6:59 PM
  • Hi Brian,

    In case you are still having problems with *.ps1 files not being digitally signed then try opening them for edit (in the built-in powershell editor or in notepad), adding something redundant (like a space character which you immediately delete) and then saving them. This will propably fix the problem with their digital signatures.

    Not sure why this is caused on some systems while on others it is working fine.

    On a relevant note I hope to start working soon on an updated installer which will be a true "setup.exe" experience (i.e. a "real" program) and be done with powershell and scripting altogether.

    Panos

    Friday, August 26, 2011 7:01 AM
  • Hi!

    Can I use Your solution with already installed windows 7? I finished installing our computer lab and I don't want to start over. I saw I can capture the active system to a vhd.  Is this vhd usable with your method? Or any guidelines how I can achieve this functionality (reboot all changes lost, except the If i want to save them)?

    Thanks in advance!

    Zsolt

    Thursday, September 8, 2011 8:28 AM
  • Thank you for the detailed walkthrough.  However, I have created the ISO four times now, using different media (Win7 Ultimate Ultimate SP1), but receive the following error each time:

    Deployment Summary: Operating system deployment did not complete successfully... 1 error and two warnings.

    File E:\Deploy\Sontrol\STEADYSTATE\TS.xml Line: 4 - End tag 'os' does not match the start tag 'variable'

    Litetouch deployment failed, Return Code = -2147467259 0x80004005

    Line 4 of TS.xml is as follows:

        <variable name="OSGUID" property="OSGUID">{018777c3-0ac2-4a3b-a1c9-8e17c03cf3ac}" enable="True"><Name>Windows 7 STARTER in Windows 7 install.wim</Name><CreatedTime>25/12/2011 7:23:19 AM</CreatedTime><CreatedBy>PC20-PCPC20</CreatedBy><LastModifiedTime>25/12/2011 7:23:19 AM</LastModifiedTime><LastModifiedBy>PC20-PCPC20</LastModifiedBy><Description>Windows 7 STARTER</Description><Platform>x86</Platform><Build>6.1.7601.17514</Build><OSType>Windows IBS</OSType><Source>.Operating SystemsWindows 7</Source><IncludesSetup>True</IncludesSetup><SMSImage>False</SMSImage><ImageFile>.Operating SystemsWindows 7Sourcesinstall.wim</ImageFile><ImageIndex>1</ImageIndex><ImageName>Windows 7 STARTER</ImageName><Flags>Starter</Flags><HAL>acpiapic</HAL><Size>7700</Size><Language>en-US</Language></os><os guid="{ad315ebc-caa3-4f97-bf86-73c25c13d6e2}" enable="True"><Name>Windows 7 HOMEBASIC in Windows 7 install.wim</Name><CreatedTime>25/12/2011 7:23:19 AM</CreatedTime><CreatedBy>PC20-PCPC20</CreatedBy><LastModifiedTime>25/12/2011 7:23:19 AM</LastModifiedTime><LastModifiedBy>PC20-PCPC20</LastModifiedBy><Description>Windows 7 HOMEBASIC</Description><Platform>x86</Platform><Build>6.1.7601.17514</Build><OSType>Windows IBS</OSType><Source>.Operating SystemsWindows 7</Source><IncludesSetup>True</IncludesSetup><SMSImage>False</SMSImage><ImageFile>.Operating SystemsWindows 7Sourcesinstall.wim</ImageFile><ImageIndex>2</ImageIndex><ImageName>Windows 7 HOMEBASIC</ImageName><Flags>HomeBasic</Flags><HAL>acpiapic</HAL><Size>7751</Size><Language>en-US</Language></os><os guid="{af26789d-73ac-45ef-8a8e-1343ac2dd56b}" enable="True"><Name>Windows 7 HOMEPREMIUM in Windows 7 install.wim</Name><CreatedTime>25/12/2011 7:23:19 AM</CreatedTime><CreatedBy>PC20-PCPC20</CreatedBy><LastModifiedTime>25/12/2011 7:23:19 AM</LastModifiedTime><LastModifiedBy>PC20-PCPC20</LastModifiedBy><Description>Windows 7 HOMEPREMIUM</Description><Platform>x86</Platform><Build>6.1.7601.17514</Build><OSType>Windows IBS</OSType><Source>.Operating SystemsWindows 7</Source><IncludesSetup>True</IncludesSetup><SMSImage>False</SMSImage><ImageFile>.Operating SystemsWindows 7Sourcesinstall.wim</ImageFile><ImageIndex>3</ImageIndex><ImageName>Windows 7 HOMEPREMIUM</ImageName><Flags>HomePremium</Flags><HAL>acpiapic</HAL><Size>8172</Size><Language>en-US</Language></os><os guid="{4b2871ac-6804-46fa-84ed-658a3d8634be}" enable="True"><Name>Windows 7 PROFESSIONAL in Windows 7 install.wim</Name><CreatedTime>25/12/2011 7:23:19 AM</CreatedTime><CreatedBy>PC20-PCPC20</CreatedBy><LastModifiedTime>25/12/2011 7:23:19 AM</LastModifiedTime><LastModifiedBy>PC20-PCPC20</LastModifiedBy><Description>Windows 7 PROFESSIONAL</Description><Platform>x86</Platform><Build>6.1.7601.17514</Build><OSType>Windows IBS</OSType><Source>.Operating SystemsWindows 7</Source><IncludesSetup>True</IncludesSetup><SMSImage>False</SMSImage><ImageFile>.Operating SystemsWindows 7Sourcesinstall.wim</ImageFile><ImageIndex>4</ImageIndex><ImageName>Windows 7 PROFESSIONAL</ImageName><Flags>Professional</Flags><HAL>acpiapic</HAL><Size>8058</Size><Language>en-US</Language></os><os guid="{af9de1c9-7e34-4cbb-81ae-62c2c9400197}</variable>

    Can you throw any light, please?

     

    Monday, December 26, 2011 4:30 AM
  • You need to remove all clg fiiles in the sources folder that are from anything other than Ulitimate or Enterprise versions. You also need to remove all index entries from the install.wim file leaving only Ulitimate or Enterprise. Google gimagex and you can use this to remove the index's. - Been there felt that. BritTech
    Wednesday, April 11, 2012 4:54 PM
  • Hi Panos - the trick here is to go to the properties of each file in the SteadyState directory (excluding the Win7CD) and unblock each of them. Of course this will only be necessary if the files are copied from another computer, which was my problem. As soon as I unblocked them all Setup ran perfectly.

    JMH

    Monday, August 26, 2013 5:55 PM
  • I am having the same issues as above with this deployment process.

    Deployment Summary: Operating system deployment did not complete successfully... 1 error and two warnings.

    File E:\Deploy\Sontrol\STEADYSTATE\TS.xml Line: 4 - End tag 'os' does not match the start tag 'variable'

    If this is a blocked file issue I should be able to resolve this by downloading the files for the SteadyState directory from source Panos to the laptop I am compiling the ISO on, so this should rectify the above.

    I will re post if successful.

    CSG

    Friday, October 11, 2013 4:38 PM
  • I now have another issue I am getting the Line 37 non-Array error when trying to run Setup.exe and I have tried all of the suggestions to resolve this running all the commands in PowerShell and also editing the *.Sp1 files then saving them. 

    This was not an issue before I was just having issues with File E:\Deploy\Sontrol\STEADYSTATE\TS.xml Line: 4 - End tag 'os' does not match the start tag 'variable' after compiling the ISO?

    I am out of ideas now any help would be great thank you.

    CSG

    Friday, October 11, 2013 6:19 PM