WSUS Post Installation issues

Joan Rubio Sabio 0 Reputation points
2025-03-03T11:51:41.3633333+00:00

I'm trying to perform a clean reinstallation on a Server that hosts SCCM principal Site, and WSUS.

When I try running post Installation tasks, the following error appears:

2025-03-03 11:33:24  Postinstall started
2025-03-03 11:33:24  Detected role services: Database, Services
2025-03-03 11:33:24  Start: LoadSettingsFromXml
2025-03-03 11:33:24  Start: GetConfigValue with filename=UpdateServices-Services.xml item=ContentLocal
2025-03-03 11:33:24  System.TypeInitializationException: The type initializer for 'Microsoft.UpdateServices.Internal.UtilConstants' threw an exception. ---> System.IO.InvalidDataException: Invalid installation directory
   at Microsoft.UpdateServices.Internal.SetupInfo.GetInstallDirectory()
   at Microsoft.UpdateServices.Internal.UtilConstants..cctor()
   --- End of inner exception stack trace ---
   at Microsoft.UpdateServices.Administration.PostInstall.GetConfigValue(String filename, String item)
   at Microsoft.UpdateServices.Administration.PostInstall.LoadSettingsFromXml()
   at Microsoft.UpdateServices.Administration.PostInstall.Execute(String[] arguments)
Fatal Error: The type initializer for 'Microsoft.UpdateServices.Internal.UtilConstants' threw an exception

The Content of UpdateServices-Services.xml is:

<?xml version="1.0" encoding="utf-16"?><INSTANCE CLASSNAME="ServerComponent_UpdateServices_Services"><PROPERTY NAME="ContentDirectory" TYPE="string"><VALUE>T:\WSUS</VALUE></PROPERTY><PROPERTY NAME="ContentLocal" TYPE="boolean"><VALUE>true</VALUE></PROPERTY></INSTANCE>

The Steps i followed to perform a clean Uninstallation where:

-Remove Software Update Point role on all sites that had it (SCCM)

-Remove WSUS role from Server Manager, (WID also removed)

-Delete Content Folder T:\WSUS, Installation folder C:\Program Files\Update Services and WID folder C:\Windows\WID

-Delete Registry keys HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Update Services and HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate

-Detatch SUSDB Database from SQL Server instance on remote server, and delete SUSDB.mdf and SUSDB_log.ldf

-Remove site and Application Pool from IIS

However, every time I perform a clean uninstallation and add the role again, the C:\Program Files\Update Services is missing 3 folders, Api, Schema and tools.

For those folders to appear, i need to run sfc /scannow after the installation finishes, and then launch Post installation tasks

When i launch it, i get the error i specified above

The Directory that contains UpdateServices-Services.xml has modify permissions to the Network Service account, so i Think it wouldn't be access related

Thanks In advance, y really need help!

Windows for business | Windows Server | User experience | Other
{count} votes

2 answers

Sort by: Most helpful
  1. Joan Rubio Sabio 0 Reputation points
    2025-03-03T14:48:24.83+00:00

    Seems Like the problem was the %appdata%\MMC wsus file, when i deleted it, and removed the role with this powershell command

    Remove-WindowsFeature –Name UpdateServices,UpdateServices-DB,UpdateServices-RSAT,UpdateServices-API,UpdateServices-UI –IncludeManagementTools
    

    Doing all the things that I explained before, it worked

    Hope this helps someone

    0 comments No comments

  2. Anonymous
    2025-03-04T08:55:56.9033333+00:00

    Hello,

    Thank you for posting in Microsoft Q&A.

    Based on the description, I understand your question is related to WSUS.

    Check that the installation directory specified in your UpdateServices-Services.xml file is correct and accessible. The error message indicates an "Invalid installation directory," which suggests there might be an issue with the path.

    If certain folders are missing after installation, you can manually create them based on a reference installation or documentation. The missing folders (Api, Schema, Tools) should be created in C:\Program Files\Update Services.

    Go to Settings > Windows Update and check for updates.

    Best Regards,

    Have a nice day.

    Molly

    ============================================

    If the Answer is helpful, please click "Accept Answer" and upvote it

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.