Unable to run post Installation task for wsus

lalajee 1,821 Reputation points
2023-05-19T14:58:51.5466667+00:00

Hi,

I have Server 2019 Std

SQL 2019 STD with CU 20

When I run Post installation task for WSUS its keep failing with below error

2023-05-19 15:42:43  Postinstall started
2023-05-19 15:42:43  Detected role services: Database, UI, Services
2023-05-19 15:42:43  Start: LoadSettingsFromXml
2023-05-19 15:42:43  Start: GetConfigValue with filename=UpdateServices-Services.xml item=ContentLocal
2023-05-19 15:42:43  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)
Windows Server 2019
Windows Server 2019
A Microsoft server operating system that supports enterprise-level management updated to data storage.
3,964 questions
Microsoft Configuration Manager Updates
Microsoft Configuration Manager Updates
Microsoft Configuration Manager: An integrated solution for for managing large groups of personal computers and servers.Updates: Broadly released fixes addressing specific issue(s) or related bug(s). Updates may also include new or modified features (i.e. changing default behavior).
1,111 questions
0 comments No comments
{count} votes

Accepted answer
  1. AllenLiu-MSFT 48,356 Reputation points Microsoft External Staff
    2023-05-22T02:50:19.7+00:00

    Hi, @lalajee

    Thank you for posting in Microsoft Q&A forum.

    2023-05-19 15:42:43 Start: GetConfigValue with filename=UpdateServices-Services.xml item=ContentLocal

    Please try renaming file name UpdateServices-Services.xml to updateservices-services.xml.old. Then run post-install again.

    (UpdateServices-Services.xml is under c:\windows\system32\servermanager\componentconfiguration)

    If issue persists, please try to remove wsus role , wid, delete database file, reinstall wsus again.

    https://www.ajtek.ca/wsus/how-to-remove-wsus-completely-and-reinstall-it/


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Add comment".


0 additional answers

Sort by: Most helpful

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.