Recently I have updated my Windows 8 to Windows 8.1. Everything seemed to be ok, until I realized that I cannot start neither of my AOS (AX 4.0, AX 2009 and AX 2012).

Service is still in place. If you tried to start e.g. AX 2012 AOS you would encounter the following errors:
Object Server 01: Error accessing registry: Cannot open key SYSTEM\CurrentControlSet\Services\Dynamics Server\6.0\01. Error code: 0 

Object Server 01: The directory "C:\WINDOWS\system32\\bin" does not exist or access to it has been denied by the operating system.

Object Server 01: The home directory for Axapta (C:\WINDOWS\system32\) does not match the required structure or can not be accessed. Please check installation, configuration and access rights.

If you tried to open AX Server Configuration Utility you would see it completely empty:

The problem is that registry keys located in HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Dynamics Server\ were deleted during the update.

Proactive solution

If you have not updated yet when the best solution would be to export that node and import after update.

Solution

Note: Provided solution works for AX 2012 R2 CU6 version.

But if you have already updated and facing this issue then you have the following options:

  • Recreate keys manually;
  • Import from your colleague;
  • Create the reg file yourself by copying and pasting the contents below.

AOS uninstall or repair won't work for this.

For your convenience below is the exported AX 2012 CU6 registry keys for Original (installed configuration). Copy the text to notepad, save as reg file and import using regedit.

Do not forget to change the flowing info before importing:

  1. AOS instance name
  2. DB Server Name
  3. DB Name
  4. Ports (TCP/IP, WSDL and netTCP) defaults 2712, 8101, 8201.
  5. User running the AOS service.
  6. Configuration name (optional)

Restart your computer after importing (otherwise you won't see changes in AX Server Configuration Utility.

----

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Dynamics Server\6.0]
"DwReportChoice"="0"

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Dynamics Server\6.0\01]
"Current"="Original (installed configuration)"
"Start"=dword:00000003
"InstanceName"="AX2012AOSNAME"
"ProductVersion"="6.2.1000.1437"
"AOSPath"="C:\\Program Files\\Microsoft Dynamics AX\\60\\Server\\AX2012AOSNAME\\Bin\\Ax32Serv.exe"

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Dynamics Server\6.0\01\Original (installed configuration)]
"dbunicodeenabled"="1"
"aosencryption"="1"
"localsysdoc"=dword:00000000
"hascompwd"=dword:00000000
"applshare"=dword:00000000
"_clientmode"=dword:00000000
"localappldoc"=dword:00000000
"createdsn_tcpipport"="1521"
"bindir"="C:\\Program Files\\Microsoft Dynamics AX\\60\\Server\\AX2012AOSNAME\\Bin\\"
"company"=""
"dbcli"="odbc"
"dbserver"="localhost"
"preloadthresholdmsec"=""
"sql"=dword:00000001
"useserverprinters"=dword:00000000
"querytimelimit"=""
"hint"="2"
"xppdebug"="0"
"hotswapenabled"="0"
"applexclusive"=dword:00000001
"log"=""
"sqldirect"=dword:00000000
"sqlformliterals"="0"
"application"="Standard"
"cachesynctime"=""
"language"="en-us"
"extracmdline"=""
"newconnectionretrycount"=""
"hassqlpwd"=dword:00000000
"sqlbuffer"="48"
"port"="2712"
"connectionidletimeout"=""
"sqltrace"="0"
"aol"="sys"
"fetchahead"=""
"client"="thin"
"native"=dword:00000000
"haswarnings"=dword:00000000
"share"=dword:00000000
"ignoredatasourceindex"="0"
"startupcmd"=""
"sqlcomplexliterals"="0"
"hasserveridletimeout"=dword:00000000
"newconnectionretrydelayms"=""
"preloadthresholdrecords"=""
"allowunauth"=dword:00000000
"database"="AX2012DBNAME"
"split_modeldb"="1"
"locallabel"=dword:00000000
"windowsauth"="1"
"localappl"=dword:00000000
"exposeserverprinters"=dword:00000000
"directory"="C:\\Program Files\\Microsoft Dynamics AX\\60\\Server\\AX2012AOSNAME\\bin\\Application"
"warnings"=""
"logdir"="C:\\Program Files\\Microsoft Dynamics AX\\60\\Server\\AX2012AOSNAME\\Log"
"opencursors"="450"
"retry"=""
"startupmsg"=""
"ModelDatabase_Baseline"=""
"ModelDBServer_Baseline"="LOCALHOST"
"helpserverlocation"=""
"WSDLPort"="8101"
"NetTCPPort"="8201"

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Dynamics Server\6.0\01\Original (installed configuration)\SetupProperties]
"AOSINSTANCENAME"="AX2012AOSNAME"
"APPLICATIONINSTANCENAME"="Standard"
"DBCLI"="odbc"
"AOSAPPLICATIONPATH"="C:\\Program Files\\Microsoft Dynamics AX\\60\\Server\\AX2012AOSNAME\\bin\\Application"
"AOSPORT"="2712"
"AOSWSDLPORT"="8101"
"AOSNETTCPPORT"="8201"
"HELPSERVERLOCATION"=""
"AOSREPORTERRORS"="0"
"TRACEPROVIDERGUID"="{bdb8293d-46bb-4ddb-aa48-24f11b416672}"
"DATABASE_MODEL_BASELINE"=""
"DBSERVER_MODEL_BASELINE"="LOCALHOST"
"STATEMENT_CACHE_MAX"="450"
"BUFFER_SIZE_MAX"="48"
"AOSACCOUNT"="DOMAIN\\USERNAME"
"LOCALIZED_BUILTIN_USERS"="BUILTIN\\Users"
"SQLHINT"="2"
"AOS_LOC_DESC"="Executes application logic and manages data access for Microsoft Dynamics® AX 2012"
"XPPDEBUGSERVER"="0"
"HOTSWAPENABLEDSERVER"="0"
"GLOBALBREAKPOINTSSERVER"="0"
"SQLDATABASE"="AX2012DBNAME"
"SQLSERVER"="LOCALHOST"
"SQLDATABASE_USEMODEL"="

Hope it works for you.

Author of the post: our former AX Upgrade Team Manager Evaldas Landauskas.