Saturday, August 21, 2010

Solution for Windows Live Messenger Error Code 81000395

Today since late afternoon I could not connect to Windows Live Messenger.
Always getting an error code 81000395 while trying to login.

Solution was found almost in seconds:

  • On the logon screen select your account
  • Click on the option “Forget Me” (this will “delete” your username and password from WLM)
  • Now, input your username and password again

For me this worked like a charm!

Thursday, August 19, 2010

WDS Error - “Windows cannot install required files (…)”– Error code: 0x80070570 – Workaround

While I’m writing this post I’m just thinking that this really may help someone like it helped me last week.

First things first:

.: Microsoft it’s over this one because are a lots of clients complaining about it
.: This is not a solution but a workaround until Microsoft folks don’t find a real solution
.: I tested this solution over 3 different machines
.: Don’t know why but I’ve installed a new machine on VMware ESX and this problem didn’t happened
.: This happened to me when I’ve created a new machine and also when I deleted previous image from a WDS image group

Now…this is the scenario:

You install a brand new machine with Windows Deployment Services, you copy a wim file from another machine, not directly from RemoteInstall folder but from DeploymentShare\Captures for example, and when you try to deploy the image from the new machine you get an error like this one:


No matter what you do, you always get this error.

Now, the really strange thing here is that supposedly the wim file should contain every single file you need to do the deployment.

The workaround:

I’ve managed to workaround this issue using a simple solution.
I’ve copied the file Res.RWM located on every imagegroup, on a working machine to the new machine. This file exists at RemoteInstall\Images\ImageGroupName and it’s like an index file of all images that were published on the WDS.

What really intrigues me is that on a new machine the index just contains information about the first image you’ve put there, but well…that’s not enough.

Why? This is what Microsoft is investigating… Smile


Just hope this helps everyone that’s getting crazy about this error.
As soon as I get any more info/solution about this, I’ll post it here.

Wednesday, August 18, 2010

Microsoft Baseline Security Analyzer 2.2 Released

Ok, this one it’s a little off the time but I just could post it before.

After a long time without any updates, Microsoft launched small upgraded version of Microsoft Baseline Security Analyzer (MBSA).

This new version hads support to Windows 7, Windows 2008 R2 and also corrects minor issues reported by customers.
There’s a x86 and a x64 version.

You can download this nice software here:
Microsoft Baseline Security Analyzer 2.2

Monday, August 16, 2010

VBScripting Hyper-V – Create Virtual Network

Continuing the vbscripting for Hyper-V, here’s a another one.

This is about creating a virtual network and “assigning” it the physical network card.

Here it goes:

Option explicit
Dim HyperVServer
Dim SwitchFriendlyName
Dim TypeLib
Dim SwitchName
Dim InternalEthernetPortFriendlyName
Dim InternalSwitchPortFriendlyName
Dim InternalSwitchPortName
Dim InternalEthernetPortName
Dim ExternalSwitchPortFriendlyName
Dim ExternalSwitchPortName
Dim ExternalEthernetPort
Dim ExternalEthernetPorts
Dim ExternalEthernetPortName
Dim ExternalEthernetPortString
Dim ScopeofResidence
Dim WMIService
Dim VirtualSwitchManagementService
Dim Switch
Dim InternalSwitchPort
Dim ExternalSwitchPort
Dim InParam
Dim OutParams
Dim Job
Dim Test

‘Prompt for the Hyper-V Server to use
HyperVServer = InputBox("Specify the Hyper-V Server to create the internal virtual network switch:")

‘Get an instance of the WMI Service in the virtualization namespace.
set WMIService = GetObject("winmgmts:\\" & HyperVServer & "\root\virtualization")

‘Get the Msvm_VirtualSwitchManagementService object
set VirtualSwitchManagementService = WMIService.ExecQuery("select * from Msvm_VirtualSwitchManagementService").ItemIndex(0)

‘Get all possible physical network adapters that can be used for a switch
Set ExternalEthernetPorts = WMIService.ExecQuery("Select * From Msvm_ExternalEthernetPort WHERE IsBound=False AND EnabledState=2")

‘Build the string to ask what physical network adapter to use
ExternalEthernetPortString = "The following network adapters are available:" & chr(10) & chr(10)

for each ExternalEthernetPort in ExternalEthernetPorts
   ExternalEthernetPortString = ExternalEthernetPortString & ExternalEthernetPort.Name & chr(10)
ExternalEthernetPortString = ExternalEthernetPortString & chr(10) & "Please type in the (exact) name of the network adapter you want to use for the external connection:"

‘Setup a loop to keep on asking for a network adapter until we get a valid response
Test = true
while test
   ExternalEthernetPortName = InputBox(ExternalEthernetPortString)
   on error resume next
   Set ExternalEthernetPort = WMIService.ExecQuery("Select * From Msvm_ExternalEthernetPort WHERE Name=’" & ExternalEthernetPortName & "’ AND IsBound=False AND EnabledState=2").ItemIndex(0)     
   If Err.Number = 0 Then
      Test = false
   End If
   on error goto 0

‘Get friendly name for the external virtual network switch (and the internal ethernet port)
SwitchFriendlyName = InputBox("Specify the name of the new external virtual network switch:")
InternalEthernetPortFriendlyName = SwitchFriendlyName

‘Set the friendly name for the internal switch port and external switch port
InternalSwitchPortFriendlyName = "InternalSwitchPort"
ExternalSwitchPortFriendlyName = "ExternalSwitchPort"

‘Generate GUIDs for the unique switch name, internal switch port name, internal ethernet port name and external switch port name
Set TypeLib = CreateObject("Scriptlet.TypeLib")
SwitchName = TypeLib.Guid
Set TypeLib = CreateObject("Scriptlet.TypeLib")
InternalSwitchPortName = TypeLib.Guid
Set TypeLib = CreateObject("Scriptlet.TypeLib")
InternalEthernetPortName = TypeLib.Guid
Set TypeLib = CreateObject("Scriptlet.TypeLib")
ExternalSwitchPortName = TypeLib.Guid

‘Create a new virtual network switch
‘Setup the input parameter list
set InParam = VirtualSwitchManagementService.Methods_("CreateSwitch").InParameters.SpawnInstance_()
InParam.FriendlyName = SwitchFriendlyName
InParam.Name = SwitchName
InParam.NumLearnableAddresses = 1024
InParam.ScopeofResidence = null

‘Execute the method and store the results in OutParam
set OutParams = VirtualSwitchManagementService.ExecMethod_("CreateSwitch", InParam)

‘Get the new switch object out of the results  
Set Switch = WMIService.Get(OutParams.CreatedVirtualSwitch)

‘Create a new internal switch port
‘Setup the input parameter list
set InParam = VirtualSwitchManagementService.Methods_("CreateSwitchPort").InParameters.SpawnInstance_()
InParam.VirtualSwitch = Switch.Path_.Path
InParam.FriendlyName = InternalSwitchPortFriendlyName
InParam.Name = InternalSwitchPortName
InParam.ScopeofResidence = null

‘Execute the method and store the results in OutParam
set OutParams = VirtualSwitchManagementService.ExecMethod_("CreateSwitchPort", InParam)

‘Get the new internal switch port out of the results  
Set InternalSwitchPort = WMIService.Get(OutParams.CreatedSwitchPort)

‘Create a new external switch port

‘Setup the input parameter list
set InParam = VirtualSwitchManagementService.Methods_("CreateSwitchPort").InParameters.SpawnInstance_()
InParam.VirtualSwitch = Switch.Path_.Path
InParam.FriendlyName = ExternalSwitchPortFriendlyName
InParam.Name = ExternalSwitchPortName
InParam.ScopeofResidence = null

‘Execute the method and store the results in OutParam
set OutParams = VirtualSwitchManagementService.ExecMethod_("CreateSwitchPort", InParam)

‘Get the new external switch port out of the results  
Set ExternalSwitchPort = WMIService.Get(OutParams.CreatedSwitchPort)

‘Pull it all together with a call to SetupSwitch

‘Setup the input parameter list
set InParam = VirtualSwitchManagementService.Methods_("SetupSwitch").InParameters.SpawnInstance_()
InParam.ExternalSwitchPort = ExternalSwitchPort.Path_.Path
InParam.InternalSwitchPort = InternalSwitchPort.Path_.Path
InParam.ExternalEthernetPort = ExternalEthernetPort.Path_.Path
InParam.InternalEthernetPortName = InternalEthernetPortName
InParam.InternalEthernetPortFriendlyName = InternalEthernetPortFriendlyName

‘Execute the method and store the results in OutParams
set OutParams = VirtualSwitchManagementService.ExecMethod_("SetupSwitch", InParam)

‘Check to see if the job completed synchronously
if (OutParams.ReturnValue = 0) then
   Wscript.Echo "External virtual network created."
elseif (OutParams.ReturnValue <> 4096) Then  
   Wscript.Echo "Failed to create external virtual network." & OutParams.ReturnValue

   ‘Get the job object
   set Job = WMIService.Get(OutParams.Job)

    ‘Wait for the job to complete (3 == starting, 4 == running)
   while (Job.JobState = 3) or (Job.JobState = 4)
      Wscript.Echo "Creating virtual network. " & Job.PercentComplete & "% complete"

      ‘Refresh the job object
      set Job = WMIService.Get(OutParams.Job)

   ‘Provide details if the job fails (7 == complete)
   MsgBox (Job.JobState)
   if (Job.JobState <> 7) Then 
      Wscript.Echo "External virtual network created."
      Wscript.Echo "ErrorCode:" & Job.ErrorCode
      Wscript.Echo "ErrorDescription:" & Job.ErrorDescription
      Wscript.Echo "Failed to create external virtual network."
      Wscript.Echo "ErrorCode:" & Job.ErrorCode
   end If
end If

VBScripting for Hyper-V – Change Default Paths

After a while without any new articles here are some new things I’ve learned about Hyper-V.

This one it’s for everyone that needs to change the default Data and VHDs default locations.

Set objVWMIService = GetObject("winmgmts:\\.\root\Virtualization")
Set objVSMS = objVWMIService.ExecQuery("SELECT * From Msvm_VirtualSystemManagementService").ItemIndex(0)

Set objVSMSSData = objVWMIService.Get("Msvm_VirtualSystemManagementServiceSettingData").SpawnInstance_()
objVSMSSData.DefaultVirtualHardDiskPath = "D:\VirtualMachines\"
objVSMSSData.DefaultExternalDataRoot = "D:\VirtualMachines\"

Set objInputSet = objVSMS.Methods_("ModifyServiceSettings").InParameters.SpawnInstance_()
Set objOutSet = objVSMS.ExecMethod_("ModifyServiceSettings",objInputSet)

if (objOutSet.ReturnValue = 0) Then
  Wscript.Echo "Changed the default VHD and Data Root"
elseif (objOutSet.ReturnValue <> 4096) Then
  Wscript.Echo "Failed to change the VHD and Data root to new values"
end If

Hope this helps!

Richard Smith LTI Walkthrough

Here it is a new MDT LTI walkthrough video from Richard Smith.

On this video Richard talks and explains the following topics:

  • Add operating systems, applications, drivers and packages to MDT
  • Configure Office 2007 into the build process
  • Create a MDT Lite Touch task sequence 
  • Setup a lab based deployment point
  • Create a customised build to a reference computer
  • Capture the reference computer as a customised WIM
  • Add the customised WIM back into MDT for deployment

    Download Link:
    Video Download

    Full post:
    Blog post link

  • How to Change “IT Organization” on Task Sequencer Dialog Box

    Here’s a tip for everyone that wants to change the default text that appears on the Task Sequence dialog box.

    The default text it’s “IT Organization” and to change it you just need to set a new value for the variable _SMSTSORGNAME on the customsettings.ini file.

    For example:

    _SMSTSORGNAME=Frontslash Inc.

    Then, you just need to update your deployment point and that’s it.

    Task Sequences – Explained

    From who cames from Windows XP unattended installations, the new Vista deployment features mais seem a little strange, confusing and scary! That happened to me…
    But, that was before having some readiness of the BDD 2007/Microsoft Deployment documents. Now I’m a little less confused.

    One of the first things that made my head go around was the Task Sequencer. I’ve never worked with SMS but who did, told me it was something similar to what we call today Microsoft Deployment tools.

    Now, here it’s some info that I’ve extrated fromDeployment_Customization_Guide.doc about the task sequences that are set by default when you install MS Deployment:

    The Microsoft Deployment process occurs in phases that are defined in the TS.xml file. Task Sequencer parses the TS.xml file to identify the appropriate sequence for performing the deployment process. The phases defined in the TS.xml file include:

    Validate Phase
    Performs validation checks to make sure that the operating system installation can proceed; specifically blocks installation on server operating systems.

    State Capture Phase
    Gathers information from the configuration file, databases, and the local machine to determine how the image installation process should proceed, including whether there is enough space to do a local USMT state backup. The scripts also invoke the USMT Scanstate.exe command as appropriate.

    Preinstall Phase
    Confirms that the necessary information has been gathered in the State Capture Phase for the Refresh Computer and Upgrade Computer scenarios. In the New Computer and Replace Computer scenarios, the script gathers the necessary information in this phase because these scenarios do not perform the State Capture Phase. Also, a backup of the computer can be optionally performed for the Refresh Computer and Upgrade Computer scenarios.

    Install Phase
    Installs the target operating system on the target computers.

    Post Install Phase
    Updates the Sysprep.inf file, Sysprep.xml file, or Unattend.txt file with information gathered in the previous custom actions based on the operating system being deployed.

    State Restore Phase
    Invokes the USMT Loadstate.exe command to restore the user state that was previously backed up.

    OEM Information on System Properties

    Windows Vista changed a little the way you set OEM Information.

    Now, everything it’s “changeable” on a single registry key.
    Here it’s the way to do it:

    1. Navigate to the following registry key: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion

    2. Locate the entry OEMInformation

    3. Add the following string values:

    Key name: Logo
    Description: Path to your companies/enterprise logo (120 x 120 pixels and *.bmp format)
    Example: C:\Windows\OEM\logo.bmp

    Key name: Manufacturer
    Description: Your manufacturer’s name
    Example: Frontslash

    Key name: SupportHours
    Description: Your support hours and week days
    Example: Monday – Sunday – 8:00 – 18:00

    Key name: SupportPhone
    Description: Your support phone number
    Example: +3512232414

    Key name: SupportURL

    Description: Your support homepage

    After adding the entry, just go to your system properties and check the changes you’ve made.

    Here’s an example of an exported OEMInformation registry key:

    Windows Registy Editor Version 5.00 [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\OEMInformation]
    "Manufacturer"="FrontSlash Inc."
    "SupportHours"="Monday - Friday - 08:30 - 18:00"

    ShowMediaCenter may cause problems

    Some time ago a problem appeared on my unattended Windows Vista installation that caused some headaches.

    The error was:

    Windows could not parse or process unattend answer file [C:\Windows\Panther\unattend.xml] for pass [oobeSystem]. The setttings specified in the answer file cannot be applied. The error was detected while processing settings for component [Microsoft-Windows-Shell-Setup]

    After some research I’ve realized that the problem was an option called ShowMediaCenter (that stands for showing or not showing the Windows Media Center icon on the Start Menu) that I’ve changed to False.
    Because my Windows Vista is the Enterprise Version (and so, doesn’t have Media Center), this was causing an error on the answer file.

    So…if your Windows Vista version is not Home Premium or Ultimate, you should not configure this setting with no value.

    By the way, you can find this setting using Windows System Image Manager (WSIM) under:

    - Unattend -> 4 specialize -> x86_Microsoft-Windows-Shell-Setup_neutral -> WindowsFeatures

    Locale Settings (inc. KeyboardLocale) – Finally Resolved

    I’ve had some issues trying to set the locale properties properly.

    When tried to set the KeyboardLocale=pt-PT it allways set it it English (US).
    After some reading and tips I finally manage to overcome that issue. I’ve found the solution on a great blog from Ben Hunter ( a Microsoft Consultant.

    So, here’s the solution:

    To solve this problem, update the KeyboardLocale line in the ZTIGather.xml file to set allow overwrites to true.

    <property id=”KeyboardLocale” type=”string” overwrite=”true”description=”Locale used for Keyboard, can be either 0409:00000409 or en-US format (default is OS Default)” />

    You then need to make sure that you skip the locale selection screen, otherwise it will override any values specified in the

    customsettings.ini. Here is an example of the rules you will need to skip this screen:

         SkipLocaleSelection = YES

         UserLocale = en-NZ

         SystemLocale = en-NZ

         UIlanguage = en-US

         KeyboardLocale = 0413:00020409;0413:00000409;0409:00020409;0409:00000409;1409:00001409

    When making this change you need to be aware of its effects. This will cause the last value gathered during rule processing to be the one used. So for example if you specify a KeyboardLacale in the database and it is also specified in the Default section then the last section processed will win(normally the first section will win), which usually means the values in the default section will win.


    Source: Ben Hunter’s Blog

    This also works good for other Locale settings as SystemLocale.

    By the way…for portuguese locale settings the code is pt-PT.

    CustomSettings.ini References

    CustomSettings.ini it’s a new file that can be used to customize the Windows Vista deployment using WDS (I believe SMS too).

    This file and the file bootstrap.ini are very useful to skip some of Windows Deployment Wizards. Here it’s t

    he Properties Reference website from Microsoft.

    I’ll paste here my “customized” CustomSettings.ini as soon as I finish it.
    I’m having a little trouble to change the keyboard layout, but I’ll work that tomorrow.