Posts

Showing posts from October, 2021

AdvancedInstaller "800703fa Illegal operation attempted on a registry key that has been marked for deletion" and setting LoadUserProfile process model setting.

Image
 If you are running an IIS ASP.NET application with a custom user account you may see the following error Retrieving the COM class factory for component with CLSID {<GUID>} failed due to the following error: 800703fa Illegal operation attempted on a registry key that has been marked for deletion.   This occurs because the custom user's profile has been unloaded by the system but IIS is still trying to access it. This can be solved by setting the Process Model > Load User Profile setting. When using AdvancedInstaller there is no direct configuration setting in the user interface. But setting this property is actually simple. Goto the IIS > Application Pools > Application Pool  > Custom Properties And add the following

Active Directory user accounts can have a blank password and ignore the password policy if the The PASSWD_NOTREQD userAccountControl bit is set

Image
When you create a new Active Directory user account using Active Directory Users and Computers you'll find that by default you have to set a password because of the domain's password policy. This is as you would expect However there are other ways to create user accounts including the .NET account management classes -for example: using (PrincipalContext context = new PrincipalContext(ContextType.Domain, Environment.UserDomainName)) {      using (UserPrincipal user = new UserPrincipal(context, "NewAccount" , String.Empty, true ))      {           user.Save();      } } These classes allow you to ignore the password policy and set a blank password. It does this by helpfully setting the  PASSWD_NOTREQD flag in the userAccountControl attribute documented here https://docs.microsoft.com/en-us/troubleshoot/windows-server/identity/useraccountcontrol-manipulate-account-properties The problem with this is that this user can be forced to set a password but can now reset to a

Sysprep was not able to validate your Windows installation, when run on Windows 10 and Windows 11.

Image
When you try and run Sysprep before imaging Windows 10 or Windows 11 you may see the error  Sysprep was not able to validate your Windows installation. You are told to check the log Checking the log shows an error similar to this SYSPRP Package Microsoft.OneDriveSync_21196.921.7.0_neutral__8wekyb3d8bbwe was installed for a user, but not provisioned for all users. This package will not function properly in the sysprep image. SYSPRP Failed to remove apps for the current user: 0x80073cf2. SYSPRP Exit code of RemoveAllApps thread was 0x3cf2. This is because Windows store apps - more information can be found here https://docs.microsoft.com/en-US/troubleshoot/windows-client/deployment/sysprep-fails-remove-or-update-store-apps The code in the Microsoft article isn't very clear, instead this script should help. You can add additional packages if SysPrep fails with another package. Clear-Host $packages = @( '*Microsoft.BingNews*' , '*Microsoft.OneDriveSync*' ) foreach (

Install Windows 11 on VMware Workstation: This PC doesn't meet the minimum system requirements.

Image
When you try and install Windows 11 on VMware workstation you see the following error: This PC doesn't meet the minimum system requirements to install this version of Windows. For more information, visit https://aka.ms/WindowsSysReq This can be because you don't have enough RAM (4GB) in the VM, a high enough CPU, or you don't have the TPM installed. You can fix this by doing the following: Check you have 4GB or RAM or more Make sure you're using UEFI Encrypt the virtual machine Install the Trusted Platform Module (TPM) You should now be able to install Windows 11. However... if you plan to used linked clones you will have a problem - encrypted virtual machines can't be used for linked clones! However the TPM security check is in the setup application only not in Windows so you can now shut down the virtual machine, decrypt it and remove the TPM. You'll then be able to create linked clones. There are also ways to ignore the check in setup by pulling up a registry

Visual Studio does not show the Winforms designer for forms or user controls instead displays the .cs file as source code

Image
When using Visual Studio you may find that forms and user controls don't display with the correct icon and instead display as a plain .cs source file. Double clicking the file displays the source code behind for the form, but does not display the form or control designer. To resolve the issue simply add a new form to the project and double click the control. This restores the project and you can delete the form. If you look at the .csproj project file before and after it appears that the subtype attributes were missing from the and adding a form puts them back.     <Compile Include="Controls\Automation Profiles\AutomationProfileCsvSettingsUI.cs">       <SubType>UserControl</SubType>     </Compile>