[MDT-OSD] RE: MDT 2013U2 Install Roles and Features souce bugfix
hi! cool, thank you! I've found a similar issue (created in Dec 2015) and added a comment with the possible solution. hope s.o. will read it ;-P br, Philipp From: listsad...@lists.myitforum.com [mailto:listsad...@lists.myitforum.com] On Behalf Of s kissel Sent: Mittwoch, 15. Februar 2017 23:34 To: mdtosd@lists.myITforum.com Subject: [MDT-OSD] Re: MDT 2013U2 Install Roles and Features souce bugfix You might see if it's already a known issue or add it as a bug in the Feedback section here: https://connect.microsoft.com/ConfigurationManagervnext/MicrosoftDeploymentToolkit From: listsad...@lists.myitforum.com<mailto:listsad...@lists.myitforum.com> <listsad...@lists.myitforum.com<mailto:listsad...@lists.myitforum.com>> on behalf of SIMA Philipp <philipp.s...@frequentis.com<mailto:philipp.s...@frequentis.com>> Sent: Wednesday, February 15, 2017 9:53:38 AM To: mdtosd@lists.myITforum.com<mailto:mdtosd@lists.myITforum.com> Subject: [MDT-OSD] MDT 2013U2 Install Roles and Features souce bugfix Hi guys! I'm new to this group. If you want to know something about me, just ask ;-) I've found a minor (but nasty) bug in installation of Roles and Features (the symptom is often known in conjunction with dotnet 3.5 installation) and fixed it. The problem: If a role or feature should be installed and "WindowsSource"-Variable is not defined, the "SourcePath"-Variable is used to find the according "OS-PATH...\sources\sxs" in ZTIOSRole.wsf's "function getSource". But this is only done for the first Role or Feature which is in queue of ProcessList-function. (some guys solved that by setting the WindowsSource variable but this is just a workaround) Why? Because the first time a role or feature is installed, the source files are copied locally and after copying the return-value of "GetSource" is set (line 851). For the next role or feature, no return value is set for "GetSource" anymore because the local folder already exists and WSUS or Internet is used as source. This is not a consistent behavior. How to fix it? Just add an "Else" to set "GetSource" if the local path already exist. Here is the whole function with the two lines added (in line 855): Function GetSource ' By default, assume any needed files (e.g. NetFx3) can be loaded from WU or WSUS. GetSource = "" ' If the user explicitly set WindowsSource, copy the files locally, ' pass the value along via the source switch, and limit access to ' the internet. If oEnvironment.Item("WindowsSource") <> "" then oUtility.ValidateConnection oEnvironment.Item("WindowsSource") If not oFSO.FolderExists(oUtility.LocalRootPath & "\sources\" & oEnvironment.Item("Architecture")) then oLogging.CreateEntry "Copying source files locally from " & oEnvironment.Item("WindowsSource"), LogTypeInfo oUtility.VerifyPathExists oUtility.LocalRootPath & "\sources\" & oEnvironment.Item("Architecture") oFSO.CopyFolder oEnvironment.Item("WindowsSource"), oUtility.LocalRootPath & "\sources\" & oEnvironment.Item("Architecture"), true End if GetSource = oUtility.LocalRootPath & "\sources\" & oEnvironment.Item("Architecture") ' If the SourcePath value was set (typically in LTI via ZTIUtility.vbs), ' copy the files locally, pass that path along via the source switch, ' and limit access to the internet. ElseIf oEnvironment.Item("SourcePath") <> "" then oUtility.ValidateConnection oEnvironment.Item("SourcePath") If not oFSO.FolderExists(oUtility.LocalRootPath & "\sources\" & oEnvironment.Item("Architecture")) then If oFSO.FolderExists(oEnvironment.Item("SourcePath") & "\sources\sxs") then oLogging.CreateEntry "Copying source files locally from " & oEnvironment.Item("SourcePath") & "\sources\sxs", LogTypeInfo oUtility.VerifyPathExists oUtility.LocalRootPath & "\sources\" & oEnvironment.Item("Architecture") oFSO.CopyFolder oEnvironment.Item("SourcePath") & "\sources\sxs", oUtility.LocalRoot
[MDT-OSD] MDT 2013U2 Install Roles and Features souce bugfix
Hi guys! I'm new to this group. If you want to know something about me, just ask ;-) I've found a minor (but nasty) bug in installation of Roles and Features (the symptom is often known in conjunction with dotnet 3.5 installation) and fixed it. The problem: If a role or feature should be installed and "WindowsSource"-Variable is not defined, the "SourcePath"-Variable is used to find the according "OS-PATH...\sources\sxs" in ZTIOSRole.wsf's "function getSource". But this is only done for the first Role or Feature which is in queue of ProcessList-function. (some guys solved that by setting the WindowsSource variable but this is just a workaround) Why? Because the first time a role or feature is installed, the source files are copied locally and after copying the return-value of "GetSource" is set (line 851). For the next role or feature, no return value is set for "GetSource" anymore because the local folder already exists and WSUS or Internet is used as source. This is not a consistent behavior. How to fix it? Just add an "Else" to set "GetSource" if the local path already exist. Here is the whole function with the two lines added (in line 855): Function GetSource ' By default, assume any needed files (e.g. NetFx3) can be loaded from WU or WSUS. GetSource = "" ' If the user explicitly set WindowsSource, copy the files locally, ' pass the value along via the source switch, and limit access to ' the internet. If oEnvironment.Item("WindowsSource") <> "" then oUtility.ValidateConnection oEnvironment.Item("WindowsSource") If not oFSO.FolderExists(oUtility.LocalRootPath & "\sources\" & oEnvironment.Item("Architecture")) then oLogging.CreateEntry "Copying source files locally from " & oEnvironment.Item("WindowsSource"), LogTypeInfo oUtility.VerifyPathExists oUtility.LocalRootPath & "\sources\" & oEnvironment.Item("Architecture") oFSO.CopyFolder oEnvironment.Item("WindowsSource"), oUtility.LocalRootPath & "\sources\" & oEnvironment.Item("Architecture"), true End if GetSource = oUtility.LocalRootPath & "\sources\" & oEnvironment.Item("Architecture") ' If the SourcePath value was set (typically in LTI via ZTIUtility.vbs), ' copy the files locally, pass that path along via the source switch, ' and limit access to the internet. ElseIf oEnvironment.Item("SourcePath") <> "" then oUtility.ValidateConnection oEnvironment.Item("SourcePath") If not oFSO.FolderExists(oUtility.LocalRootPath & "\sources\" & oEnvironment.Item("Architecture")) then If oFSO.FolderExists(oEnvironment.Item("SourcePath") & "\sources\sxs") then oLogging.CreateEntry "Copying source files locally from " & oEnvironment.Item("SourcePath") & "\sources\sxs", LogTypeInfo oUtility.VerifyPathExists oUtility.LocalRootPath & "\sources\" & oEnvironment.Item("Architecture") oFSO.CopyFolder oEnvironment.Item("SourcePath") & "\sources\sxs", oUtility.LocalRootPath & "\sources\" & oEnvironment.Item("Architecture"), true GetSource = oUtility.LocalRootPath & "\sources\" & oEnvironment.Item("Architecture") Else oLogging.CreateEntry "SourcePath was set, but " & oEnvironment.Item("SourcePath") & "\sources\sxs does not exist, not using local source.", LogTypeInfo End if Else GetSource = oUtility.LocalRootPath & "\sources\" & oEnvironment.Item("Architecture") End if End if End Function Can some MS guy please fix this in next MDT update. (I know there is a new version of MDT available since Nov16 which I have not checked right now, but assume the problem still exists). br, Philipp