<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.technet.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>The Deployment Guys : Windows Vista</title><link>http://blogs.technet.com/deploymentguys/archive/tags/Windows+Vista/default.aspx</link><description>Tags: Windows Vista</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>Preventing OEM builds from Accidentally Performing Mini-Setup without the Task Sequence</title><link>http://blogs.technet.com/deploymentguys/archive/2009/12/01/preventing-oem-builds-from-accidentally-performing-mini-setup-without-the-task-sequence.aspx</link><pubDate>Tue, 01 Dec 2009 16:48:00 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3297619</guid><dc:creator>DeploymentGuys</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.technet.com/deploymentguys/comments/3297619.aspx</comments><wfw:commentRss>http://blogs.technet.com/deploymentguys/commentrss.aspx?PostID=3297619</wfw:commentRss><wfw:comment>http://blogs.technet.com/deploymentguys/rsscomments.aspx?PostID=3297619</wfw:comment><description>When you pre-load an OEM build on machines, they are usually set-up to perform Mini-setup as soon as they come up. Customers sometimes have difficulties ensuring that these machines boot to WinPE using boot media or PXE rather than simply performing Mini-setup...(&lt;a href="http://blogs.technet.com/deploymentguys/archive/2009/12/01/preventing-oem-builds-from-accidentally-performing-mini-setup-without-the-task-sequence.aspx"&gt;read more&lt;/a&gt;)&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3297619" width="1" height="1"&gt;</description><category domain="http://blogs.technet.com/deploymentguys/archive/tags/Tips+and+Tricks/default.aspx">Tips and Tricks</category><category domain="http://blogs.technet.com/deploymentguys/archive/tags/Windows+Vista/default.aspx">Windows Vista</category><category domain="http://blogs.technet.com/deploymentguys/archive/tags/MDT/default.aspx">MDT</category><category domain="http://blogs.technet.com/deploymentguys/archive/tags/Windows+7/default.aspx">Windows 7</category></item><item><title>Useful Script Number 5 - Adjusting the Default User Registry Hive</title><link>http://blogs.technet.com/deploymentguys/archive/2008/06/06/useful-script-number-5-adjusting-the-default-user-registry-hive.aspx</link><pubDate>Fri, 06 Jun 2008 17:03:00 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3067042</guid><dc:creator>DeploymentGuys</dc:creator><slash:comments>7</slash:comments><comments>http://blogs.technet.com/deploymentguys/comments/3067042.aspx</comments><wfw:commentRss>http://blogs.technet.com/deploymentguys/commentrss.aspx?PostID=3067042</wfw:commentRss><wfw:comment>http://blogs.technet.com/deploymentguys/rsscomments.aspx?PostID=3067042</wfw:comment><description>&lt;p&gt;&lt;font size="1"&gt;&lt;b&gt;&lt;/b&gt;&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="1"&gt;&lt;b&gt;&lt;/b&gt;&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="2"&gt;&lt;b&gt;Michael Murgolo &lt;/b&gt;did a great post on the different ways to adjust default settings when building an image (&lt;/font&gt;&lt;a href="http://blogs.technet.com/deploymentguys/archive/2008/02/18/configuring-default-user-and-computer-settings-for-windows-image-deployment.aspx"&gt;&lt;font size="2"&gt;Configuring default settings for Windows image deployment&lt;/font&gt;&lt;/a&gt;&lt;font size="2"&gt;) and one of the options presented was to targeted changes to the Default User Registry hive and profile folders. I had to do this recently and put together a script that can be launched from the MDT task sequence because I was finding my customised Administrator profile wasn't being copied over correctly to the Default User profile as part of SysPrep. &lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="2"&gt;As Michael mentioned in his post - there are three main processes...you first need to load the default user hive (NTUser.dat) - make the changes you require - then unload the user hive. I have reproduced the core part of my script that does this process for discussion.&lt;/font&gt;&lt;/p&gt; &lt;strong&gt;&lt;/strong&gt;  &lt;p&gt;&lt;font size="2"&gt;&lt;strong&gt;The first section sets the two variables that will be used - one to store the temp key&lt;/strong&gt; &lt;font face="cour"&gt;(&lt;/font&gt;&lt;font face="Courier"&gt;sTempHive&lt;/font&gt;&lt;font face="cour"&gt;)&lt;/font&gt;&lt;strong&gt; that we will load to, and the second to hold the profile file and location that we want to load&lt;/strong&gt; (&lt;font face="Courier"&gt;sDefaultUserHive&lt;/font&gt;)&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="2"&gt;&lt;strong&gt;For Windows Vista the entry&lt;/strong&gt; &lt;font face="Courier"&gt;&amp;quot;&amp;quot;&amp;quot;%USERPROFILE%\..\Default\NTUSER.DAT&amp;quot;&amp;quot;&amp;quot;&lt;/font&gt;&lt;strong&gt; refers to C:\Users\Default\ntuser.dat&lt;/strong&gt;&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font face="Courier" size="1"&gt;sTempHive = &amp;quot;&amp;quot;&amp;quot;HKEY_USERS\Test&amp;quot;&amp;quot;&amp;quot;      &lt;br /&gt;sDefaultUserHive = &amp;quot;&amp;quot;&amp;quot;%USERPROFILE%\..\Default\NTUSER.DAT&amp;quot;&amp;quot;&amp;quot;       &lt;br /&gt;sSName = oUtility.ScriptName       &lt;br /&gt;set oshell = WScript.CreateObject (&amp;quot;Wscript.Shell&amp;quot;) &lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font face="Courier" size="1"&gt;iZTIRetValue=&amp;quot;1&amp;quot; &lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;font size="2"&gt;We then need to start logging - it's the law :-)&lt;/font&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;font face="Courier" size="1"&gt;oLogging.CreateEntry sSName &amp;amp; &amp;quot;: Actions Start - Updating Default Profile&amp;quot;,LogTypeInfo      &lt;br /&gt;oLogging.CreateEntry sSName &amp;amp; &amp;quot;: Loading the Default User hive&amp;quot;,LogTypeInfo &lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;font size="2"&gt;The next section runs reg load to load the NTUser.dat file from the default user directory to the temp key (HKEY_USERS\Test) set in the first section - if there is an error the script fails and quits with a specific failure number or we log success.&lt;/font&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;font face="Courier" size="1"&gt;oShell.run &amp;quot;reg load &amp;quot; &amp;amp; sTempHive &amp;amp; &amp;quot; &amp;quot; &amp;amp; sDefaultUserHive      &lt;br /&gt;If Err&amp;lt;&amp;gt;0 Then       &lt;br /&gt;&amp;#160; oLogging.CreateEntry sSName &amp;amp; &amp;quot;: Failed to load the registry hive &amp;quot; &amp;amp; sDefaultUserHive,LogTypeError       &lt;br /&gt;&amp;#160; ZTIProcess=70       &lt;br /&gt;&amp;#160; Exit Function       &lt;br /&gt;End If       &lt;br /&gt;oLogging.CreateEntry sSName &amp;amp; &amp;quot;: Default User Hive Loaded to &amp;quot; &amp;amp; sTempHive,LogTypeInfo       &lt;br /&gt;oLogging.CreateEntry sSName &amp;amp; &amp;quot;: Starting Registry Changes... &amp;quot;,LogTypeInfo &lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;font size="1"&gt;&lt;/font&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;font size="2"&gt;Now that the hive is loaded we can start changing stuff...as an example - I have set the code to change the wallpaper and the screen saver for the default user - again with error checking and specific failure codes&lt;/font&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="2"&gt;&lt;strong&gt;This codes sets the wallpaper (the file needs to be where you set the key to :-)&lt;/strong&gt;&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font face="Courier" size="1"&gt;oLogging.CreateEntry sSName &amp;amp; &amp;quot;: Setting Default User Wallpaper&amp;quot;,LogTypeInfo      &lt;br /&gt;RegPath = &amp;quot;HKEY_USERS\Test\Control Panel\Desktop\&amp;quot;       &lt;br /&gt;oshell.RegWrite Regpath &amp;amp; &amp;quot;WallPaper&amp;quot;, &amp;quot;C:\Windows\Web\Wallpaper\CorporateWallpaper.bmp&amp;quot;, &amp;quot;REG_SZ&amp;quot;       &lt;br /&gt;If Err&amp;lt;&amp;gt;0 Then       &lt;br /&gt;&amp;#160; oLogging.CreateEntry sSName &amp;amp; &amp;quot;: Failed to update wallpaper file setting&amp;quot;,LogTypeError       &lt;br /&gt;&amp;#160; ZTIProcess=60       &lt;br /&gt;&amp;#160; Exit Function       &lt;br /&gt;End If &lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;font size="2"&gt;...and this codes sets the screen saver (again - the file needs to be where you set the key to :-)&lt;/font&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;font face="Courier" size="1"&gt;oLogging.CreateEntry sSName &amp;amp; &amp;quot;: Setting Default User Screensaver&amp;quot;,LogTypeInfo      &lt;br /&gt;RegPath = &amp;quot;HKEY_USERS\Test\Control Panel\Desktop\&amp;quot;       &lt;br /&gt;oshell.RegWrite Regpath &amp;amp; &amp;quot;SCRNSAVE.EXE&amp;quot;, &amp;quot;C:\Windows\CorporateScreensaver.scr&amp;quot;, &amp;quot;REG_SZ&amp;quot;       &lt;br /&gt;If Err&amp;lt;&amp;gt;0 Then       &lt;br /&gt;&amp;#160; oLogging.CreateEntry sSName &amp;amp; &amp;quot;: Failed to update Screensaver settings&amp;quot;,LogTypeError       &lt;br /&gt;&amp;#160; ZTIProcess=50       &lt;br /&gt;&amp;#160; Exit Function       &lt;br /&gt;End If &lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;font size="2"&gt;Once all of the changes have been made - its time to unload the hive from its temp key - again with logging and error checking&lt;/font&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;font face="Courier" size="1"&gt;oLogging.CreateEntry sSName &amp;amp; &amp;quot;: Unloading the Default User hive&amp;quot;,LogTypeInfo &lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font face="Courier" size="1"&gt;oShell.run &amp;quot;reg unload &amp;quot; &amp;amp; sTempHive      &lt;br /&gt;If Err&amp;lt;&amp;gt;0 Then       &lt;br /&gt;&amp;#160; oLogging.CreateEntry sSName &amp;amp; &amp;quot;: Failed to unload the default user registry hive&amp;quot;,LogTypeError       &lt;br /&gt;&amp;#160; ZTIProcess=40       &lt;br /&gt;&amp;#160; Exit Function       &lt;br /&gt;End If       &lt;br /&gt;oLogging.CreateEntry sSName &amp;amp; &amp;quot;: Actions completed&amp;quot;,LogTypeInfo&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font face="Courier" size="1"&gt;&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="1"&gt;&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="1"&gt;&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="2"&gt;&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="2"&gt;The completed script can be added to your MDT task sequence towards the end - so that it runs before the machine SysPreps and reboots for capture.&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="2"&gt;The complete script - in MDT format (to include logging and access to classes from ZTIUtility.wsf) with a number of other changes included is available on the Deployment Guys SkyDrive:&lt;/font&gt;&lt;/p&gt; &lt;iframe style="border-right: #dde5e9 1px solid; padding-right: 0px; border-top: #dde5e9 1px solid; padding-left: 0px; padding-bottom: 0px; margin: 3px; border-left: #dde5e9 1px solid; width: 240px; padding-top: 0px; border-bottom: #dde5e9 1px solid; height: 66px; background-color: #ffffff" marginwidth="0" marginheight="0" src="http://cid-7be6feba9e7c999c.skydrive.live.com/embedrowdetail.aspx/DeploymentGuys/zCFG-DefaultUser.zip" frameborder="0" scrolling="no"&gt;&lt;/iframe&gt;  &lt;p&gt;This post was contributed by &lt;b&gt;Richard Smith&lt;/b&gt; a Senior Consultant with Microsoft Services, UK.&lt;/p&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3067042" width="1" height="1"&gt;</description><category domain="http://blogs.technet.com/deploymentguys/archive/tags/Scripts/default.aspx">Scripts</category><category domain="http://blogs.technet.com/deploymentguys/archive/tags/Deployment/default.aspx">Deployment</category><category domain="http://blogs.technet.com/deploymentguys/archive/tags/Utilities/default.aspx">Utilities</category><category domain="http://blogs.technet.com/deploymentguys/archive/tags/Support/default.aspx">Support</category><category domain="http://blogs.technet.com/deploymentguys/archive/tags/Windows+Vista/default.aspx">Windows Vista</category><category domain="http://blogs.technet.com/deploymentguys/archive/tags/Default+User/default.aspx">Default User</category></item><item><title>Getting caught out by your logon script</title><link>http://blogs.technet.com/deploymentguys/archive/2008/05/26/getting-caught-out-by-your-logon-script.aspx</link><pubDate>Mon, 26 May 2008 11:36:05 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3061082</guid><dc:creator>DeploymentGuys</dc:creator><slash:comments>3</slash:comments><comments>http://blogs.technet.com/deploymentguys/comments/3061082.aspx</comments><wfw:commentRss>http://blogs.technet.com/deploymentguys/commentrss.aspx?PostID=3061082</wfw:commentRss><wfw:comment>http://blogs.technet.com/deploymentguys/rsscomments.aspx?PostID=3061082</wfw:comment><description>&lt;p&gt;Whenever I go onsite with a customer to start a Windows Vista deployment project I always like to discuss with them the issues that we will be having during the project.&amp;#160; I do this so that, together, we can try and avoid having the issues in the first place.&amp;#160; Most of the issues the customer is already aware of as they have been testing Windows Vista in a laboratory environment for a while; however, there is one issue that nearly always catches them unaware and gives them major headaches, their logon script.&lt;/p&gt;  &lt;p&gt;This is often one of the biggest problems that a company will have when trying to deploy Windows Vista.&amp;#160; The reason that most people do not notice that the logon script does not work on Windows Vista is because they have done their testing &lt;em&gt;only&lt;/em&gt; in a laboratory environment where the logon script does not exist.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Let's look at a hypothetical example.&amp;#160; Contoso developed a MS-DOS based logon script when they first rolled out their systems on Windows NT 4.0.&amp;#160; When Windows 2000 was realised, they made some amendments and added more code to the script in order for it to work on the new platform.&amp;#160; When Windows XP was released, they had to tweak it again and add substantially more code in order to be able to migrate it to the Windows XP platform.&amp;#160; Because the script has been extended each time they rolled out a new OS, it is now a monster of a script with almost 2000 lines of code.&lt;/p&gt;  &lt;p&gt;Now, based on their past experience, they have assumed that they will just need to tweak it and probably add some more code so that it works with Windows Vista, consequently, they have not actually gotten around to testing the script yet, nor assign the resources to this task.&amp;#160; Big mistake, because they haven't realised that the chance of the script working 100% on Windows Vista is almost 0.&lt;/p&gt;  &lt;p&gt;Why?&amp;#160; The new security model that Windows Vista uses, that's why.&amp;#160; Let me give an example.&amp;#160; Contoso has an application that is vital to their business.&amp;#160; It is an application that requires certain keys to exist in the HKEY_CURRENT_USER section of the registry, and without those keys the application will not start.&amp;#160; Because Contoso users do not have roaming profiles, the IT team added the following line to their logon script to ensure that this application always works, regardless of which computer the user logs on to:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;strong&gt;regedit.exe /s %logonserver%\vitalapp.reg&lt;/strong&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;Consequently, when the user logs on the registry file imports the required keys into the registry and the application works correctly, and because this is in the logon script the process is invisible to the end user.&amp;#160; However, if the same script is run on Windows Vista, the following window will appear during the execution of the logon script:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.technet.com/blogfiles/deploymentguys/WindowsLiveWriter/GettingcaughtoutbyyourlogonscriptandGrou_8CE8/image_2.png"&gt;&lt;img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="246" alt="image" src="http://blogs.technet.com/blogfiles/deploymentguys/WindowsLiveWriter/GettingcaughtoutbyyourlogonscriptandGrou_8CE8/image_thumb.png" width="444" border="0" /&gt;&lt;/a&gt;&lt;font size="1"&gt; The famous (or infamous...?) User Account Control (UAC) window&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;This window will appear because the resource regedit.exe is a protected file that requires administrative rights to be able to run it.&amp;#160; Unfortunately for Contoso, their logon script imports 12 different registry files which means that their logon script causes the UAC prompt to appear 12 times.&lt;/p&gt;  &lt;p&gt;There are several ways to stop this message appearing, but they all reduce the overall level of security of the operating system (for example, you could disable UAC or give all users admin rights).&lt;/p&gt;  &lt;p&gt;But don't panic!&amp;#160; There are plenty of solutions that you can use to solve these issues whilst maintaining the UAC feature and the extra security benefits that it gives.&amp;#160; The method I also recommend to customers is to use custom ADM files to create the registry keys, see &lt;a href="http://blogs.technet.com/grouppolicy/archive/2007/09/21/setting-default-registry-key-values-using-custom-adm-files-part-1-of-2.aspx"&gt;here&lt;/a&gt; for a good guide on how to do it.&amp;#160; That way, every time the user logs on and receives their group policy configuration, the registry key will be created.&amp;#160; And, because it runs in a different context to the user, it will have enough permissions in the registry to create the keys without invoking the UAC window.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;If you are considering, or even if you have already started, deploying Windows Vista in your business environment, I strongly recommend that you test your logon script thoroughly and as soon as possible on Windows Vista.&amp;#160; The last thing you want is to have to put the deployment on hold when the problems start appearing.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;em&gt;This post was contributed by &lt;strong&gt;Daniel Oxley&lt;/strong&gt; a consultant with Microsoft Services Spain&lt;/em&gt;&lt;/p&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3061082" width="1" height="1"&gt;</description><category domain="http://blogs.technet.com/deploymentguys/archive/tags/Scripts/default.aspx">Scripts</category><category domain="http://blogs.technet.com/deploymentguys/archive/tags/Deployment/default.aspx">Deployment</category><category domain="http://blogs.technet.com/deploymentguys/archive/tags/Tips+and+Tricks/default.aspx">Tips and Tricks</category><category domain="http://blogs.technet.com/deploymentguys/archive/tags/Windows+Vista/default.aspx">Windows Vista</category></item></channel></rss>