' константы, обозначающие ветки реестра const HKCR = &H80000000 const HKCU = &H80000001 const HKLM = &H80000002 const HKU = &H80000003 const strAOSkey = "system\currentcontrolset\services\axapta object server\applications" const strAOSsvc = "Axapta Object Server" const strHost = "." ' подставить нужное имя хоста; точка == localhost set oWshShell = CreateObject("WScript.Shell") set oReg = GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & strHost & "\root\default:StdRegProv") oReg.EnumKey HKLM, strAOSkey, colKeys ' тормозим все AOS'ы, о которых есть упоминания в реестре for each objKey in colKeys WScript.Echo "Stopping AOS '" & objKey & "' at " & strHost oWshShell.Run "rundll32.exe AosMgr.dll,AosStop_RunDll " & strHost & " """ & objKey & """ 1", 7, True next ' тормозим службу Axapta Object Manager set oWMI = GetObject("winmgmts:\\" & strHost & "\root\cimv2") oWMI.ExecMethod("Win32_Service.Name='" & strAOSsvc & "'", "StopService") set oReg = nothing set oWshShell = nothing set oWMI = nothing