Atlanta Custom Software Development 

   Search        Code/Page

User Login



Forgot the Password?
» Web Development
» Maintenance
» Data Integration/BI
» Information Management
» Regular Expr Tester
» Free Tools

Hide the Automation Manager

Total Hit ( 2635)

Rate this article:     Poor     Excellent 

 Submit Your Question/Comment about this article



If you haven't switched to DCOM yet, and still use Remote OLE Automation, you must launch the Automation Manager program on the server machine, in order to let the server respond to requests coming from client workstations.

The Automation Manager displays a visible window at launch time, which then minimize itself. However, a user can easily bring it on the foreground and accidentally close it, thus stopping the support for Remote OLE Automation on that machine. For this reason, it's advisable that production systems load the Automation Manager in hidden mode, which can be done using the /HIDDEN option on the command line:

Click here to copy the following block

If the Automation Manager is loaded in this way, the only way to interactively stop it - short of a machine reboot - is to locate the Task Manager and end the program from there. Alternatively, you can use the following VB routine to close it programmatically:

Click here to copy the following block
Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal _
  lpClassName As String, ByVal lpWindowName As String) As Long
Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal _
  hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, _
  lParam As Any) As Long
Const WM_CLOSE = &H10

' Return True if the Automation Manager has been
' successfully closed, False otherwise

Function CloseAutomationManager() As Function
  Dim handle As Long
  handle = FindWindow("MSAutMgr32", vbNullString)
  If handle Then
    ' Try to close the Automation Manager
    SendMessage handle, WM_CLOSE, 0, ByVal 0&
  End If
  ' Return True if the Automation Manager isn't running any longer
  CloseAutomationManager = (FindWindow("MSAutMgr32", vbNullString) = 0)
End Function

For more information see: Microsoft Knowledge Base article Q138067.

Submitted By : Nayan Patel  (Member Since : 5/26/2004 12:23:06 PM)

Job Description : He is the moderator of this site and currently working as an independent consultant. He works with, SQL Server and other MS technologies. He is, MCDBA and MCSE. In his free time he likes to watch funny movies and doing oil painting.
View all (893) submissions by this author  (Birth Date : 7/14/1981 )

Home   |  Comment   |  Contact Us   |  Privacy Policy   |  Terms & Conditions   |  BlogsZappySys

© 2008 BinaryWorld LLC. All rights reserved.