question

Nuno-Alexandre avatar image
0 Votes"
Nuno-Alexandre asked deepakar answered

Error "The Registry Key SetupFiles was not found" installing AADConnect

When trying to install or upgrade AADConnect I'm getting the error "The Registry Key SetupFiles was not found" and the trace file contains the following error stack:

[12:05:20.808] [ 1] [INFO ] Determining installation action for Azure AD Sync Engine (545334d7-13cd-4bab-8da1-2775fa8cf7c2)
[12:05:20.808] [ 1] [WARN ] An unexpected error occurred while reading the SetupFiles registry key.
Exception Data (Raw): System.ArgumentException: Path cannot be the empty string or all whitespace.
at System.IO.Directory.CreateDirectory(String path)
at System.Management.Automation.Host.PSHostUserInterface.GetTranscriptOptionFromSettings(Dictionary`2 settings, TranscriptionOption currentTranscript)
at System.Management.Automation.Host.PSHostUserInterface.GetSystemTranscriptOption(TranscriptionOption currentTranscript)
at System.Management.Automation.Host.PSHostUserInterface.CheckSystemTranscript()
at System.Management.Automation.Internal.Host.InternalHostUserInterface..ctor(PSHostUserInterface externalUI, InternalHost parentHost)
at System.Management.Automation.Internal.Host.InternalHost..ctor(PSHost externalHost, ExecutionContext executionContext)
at System.Management.Automation.ExecutionContext.InitializeCommon(AutomationEngine engine, PSHost hostInterface)
at System.Management.Automation.AutomationEngine..ctor(PSHost hostInterface, RunspaceConfiguration runspaceConfiguration, InitialSessionState iss)
at System.Management.Automation.Runspaces.LocalRunspace.DoOpenHelper()
at System.Management.Automation.Runspaces.RunspaceBase.CoreOpen(Boolean syncCall)
at System.Management.Automation.PowerShell.Worker.CreateRunspaceIfNeededAndDoWork(Runspace rsToUse, Boolean isSync)
at System.Management.Automation.PowerShell.CoreInvokeHelper[TInput,TOutput](PSDataCollection`1 input, PSDataCollection`1 output, PSInvocationSettings settings)
at System.Management.Automation.PowerShell.CoreInvoke[TInput,TOutput](PSDataCollection`1 input, PSDataCollection`1 output, PSInvocationSettings settings)
at System.Management.Automation.PowerShell.Invoke(IEnumerable input, PSInvocationSettings settings)
at Microsoft.Online.Deployment.PowerShell.LocalPowerShell.Invoke()
at Microsoft.Online.Deployment.PowerShell.PowerShellHelper.InvokeCommand(IPowerShell powerShell, Command command)
at Microsoft.Online.Deployment.PowerShell.PowerShellHelper.GetRegistryValue(IPowerShell powerShell, String keyPath, String valueName, Object& data)
[12:05:20.808] [ 1] [ERROR] Caught an exception while creating the initial page set on the root page.
Exception Data (Raw): System.Exception: The Registry Key SetupFiles was not found.
at Microsoft.Online.Deployment.Types.Providers.EnvironmentProvider.GetSetupFilesPath()
at Microsoft.Online.Deployment.Types.SoftwareComponents.AzureADSyncEngineComponent.InitializeMinimumVersion()
at Microsoft.Online.Deployment.Types.SoftwareComponents.AzureADSyncEngineComponent.CheckInstallationState(IEnumerable`1 installedPackages)
at Microsoft.Online.Deployment.Framework.SoftwareComponents.DependentSoftwareProduct.CheckInstallationState()
at System.Collections.Generic.List`1.ForEach(Action`1 action)
at Microsoft.Online.Deployment.OneADWizard.Runtime.Stages.DetectInstalledComponents.Execute(String& message, GlobalContext globalWizardContext, Boolean& isPasswordSyncSupported)
at Microsoft.Online.Deployment.OneADWizard.UI.WizardPages.RootPageViewModel.GetInitialPagesCore()
at Microsoft.Online.Deployment.OneADWizard.UI.WizardPages.RootPageViewModel.GetInitialPages()
[14:20:23.469] [ 1] [INFO ] Opened log file at path C:\ProgramData\AADConnect\trace-20210611-115424.log

azure-ad-connect
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

We found that the reason for this error is related with PowerShell Transcript functionally as you can see from the error stack:


Exception Data (Raw): System.ArgumentException: Path cannot be the empty string or all whitespace.
at System.IO.Directory.CreateDirectory(String path)
at System.Management.Automation.Host.PSHostUserInterface.GetTranscriptOptionFromSettings(Dictionary`2 settings, TranscriptionOption currentTranscript)


AADConnect setup uses powershell to query a registry key called SetupFiles and since PowerShell Transcript was enabled it was trying to create the target folder for the transcript file but it was failing. Either fixing the target path or disabling PowerShell Transcript and rebooting the server fixes this issue.

2 Votes 2 ·

1 Answer

deepakar avatar image
0 Votes"
deepakar answered

Thanks for the answer @NunoAlex

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.