Automated Application Management for Microsoft Endpoint Manager

Simplify third-party application management

Knowledge Base ArticlesRequest Trial

CreateDirectory failed Error when Publishing Third-Party Updates

In this video guide, we will cover an error you may encounter when trying to publish third-party software updates to WSUS.

This exception happens when the WSUS UpdateServicesPackages folder or WSUSContent folder doesn’t exist, isn’t shared correctly, not set correctly in the SUSDB, or has incorrect permissions.

Topics covered in this article:

Determine if You Are affected by Error: CreateDirectory failed

Depending on the method you are using to publish updates to WSUS, you will see one of the following errors in the PatchMyPC.logSMS_ISVUPDATES_SYNCAGENT.log, SCUP.log, or UpdatesPublisher.log

An error occurred while publishing an update to WSUS: createdirectory failed

SyncUpdate: Exception Message: CreateDirectory failed

Exception Message: CreateDirectory failed

Step 1: Check if the WSUS Content Shared Directories Exist

If Step 1 looks okay, perform the following check: Open the Computer Management snap-in by opening a run dialog and typing compmgmt.msc

createdirectory failed verify WSUS Shares Exist

If the WsusContent or UpdateServicesPackages don’t exist you can either manually create them with the appropriate permissions or an easier option may be to move the WSUS content folders to a new folder to reset all settings.

We expect to see that both folders exist, and the paths match those found above in the share dialog

Step 2: Validate the Permissions on the WsusContent and UpdateServicesPackages Shares

After validating the shares exist, confirm the WsusContent or UpdateServicesPackages have Allow permissions for the Share Permissions for NETWORK SERVICE, WSUS Administrators, and Administrators.

validate sharing permissions wsuscontent

For NTFS permissions on the Security tab, you will need to ensure the Allow permission is applied for the following users and groups: SYSTEM, NETWORK SERVICE, WSUS Administrators, Administrators.

 NTFS Permissions Needed to Fix createdirectory failed

Step 3: Validate the WSUS Content Folder in the Registry Matches the SUSDB

If steps 1 and 2 are correct, you should check the values in the registry match the values in the database (SUSDB).

  1. To check the WSUS ContentDir in the Registry check: HKLM\SOFTWARE\Microsoft\Update Services\Server\Setup:ContentDir
  2. To check the value in the SUSDB run the following query in SQL Management Studio against the SUSDB:

Select LocalContentCacheLocation from tbConfigurationB

Ensure the paths resolve to the same root folder as shown below:

Validate WSUSContent Matches for Error An error occurred while publishing an update to WSUS: createdirectory failed

If these values don’t match and one is incorrect, you should review the following KB instead specific to this scenario: Failed to sign package; error was: 2147942403

Resolution for Issues in Step 1 or Step 2 (Video Format)

The video guide goes into more detail about why the updates fail to publish to WSUS with error “CreateDirectory failed” and the possible resolutions.

If this resolution doesn’t work for you, please use our technical support form here https://patchmypc.com/technical-support