Installing Azure AD Connect on a Win2012 server.
The old version of ADSync from 2013 was installed on a different 2012 server. We disabled sync in the cloud via PowerShell and then uninstalled ADSync from that server.
Then on a different Win 2012 server which had not had ADSync on it, we tried to install Azure AD Connect. (We originally tried to install it on the same server, but it saw that it had already had ADSync and wanted to read a config file that was no longer there since we'd uninstalled it, and we couldn't get past that.)
On the fresh server I chose the Express option, and during the Configure stage, it stopped with this error:
Unable to install the Synchronization Service. The filename or extension is too long. Please see the Application and System event logs for additional details.
In the app log there were 906 events that essentially repeat what I found in the trace file.
This is the error from the trace file:
[10:20:08.238] [ 18] [ERROR] PerformConfigurationPageViewModel: Caught exception while installing synchronization service.
Exception Data (Raw): System.Exception: Unable to install the Synchronization Service. The filename or extension is too long Please see the Application and System event logs for additional details. ---> System.ComponentModel.Win32Exception: The filename or extension is too long
at System.ServiceProcess.ServiceInstaller.Install(IDictionary stateSaver)
at Microsoft.Online.Deployment.Framework.Providers.ServiceControllerProvider.CreateService(String serviceName, String serviceDescription, String username, String password, String assemblyPath)
at Microsoft.Azure.ActiveDirectory.Synchronization.Setup.SynchronizationServiceSetupTask.CreateBootstrapService(SyncServiceAccount syncServiceAccount)
at Microsoft.Azure.ActiveDirectory.Synchronization.Setup.SynchronizationServiceSetupTask.InstallCore(String logFilePath, String logFileSuffix)
at Microsoft.Azure.ActiveDirectory.Synchronization.Framework.ActionExecutor.ExecuteWithSetupResultsStatus(SetupAction action, String description, String logFileName, String logFileSuffix)
at Microsoft.Azure.ActiveDirectory.Synchronization.Setup.SetupBase.Install()