Results 1 to 3 of 3
  1. #1
    New Lounger
    Join Date
    Apr 2003
    Location
    Burnley, Lancashire, England
    Posts
    16
    Thanks
    0
    Thanked 0 Times in 0 Posts

    How to open computer management from a command (Access 2000)

    I have a software audit database and wanted a quick access button to computer management, so i can check peoples hardware against my list.

    I have tried ;

    Dim stAppName As String

    stAppName = "c:winntsystem32compmgmt.msc"
    Call Shell(stAppName, 1)

    and recieve message 'invalid procedure call or argument'


    also would it be possible to take the computers network name which is in a text box 'compname' and automatically connect to this computer using computer management.

    Have created a button that opens the default admin share

    Dim stAppName As String

    stAppName = "C:WINNTexplorer.exe"
    stAppName = stAppName & " " & CompName & "c$"
    Call Shell(stAppName, 1)

    but the computer management seems to be abit beyond me at the moment

  2. #2
    Bronze Lounger
    Join Date
    Nov 2001
    Location
    Arlington, Virginia, USA
    Posts
    1,394
    Thanks
    0
    Thanked 3 Times in 3 Posts

    Re: How to open computer management from a command (Access 2000)

    You can't run Computer Management by itself, you have to specify the associated application, Microsoft Management Console (MMC). (See att'd screen shot.) Example using Shell function to open program:

    Public Sub TestShell()

    Dim dblShell As Double
    dblShell = Shell("C:WINDOWSSYSTEM32MMC.EXE C:WINDOWSSYSTEM32COMPMGMT.MSC", vbNormalFocus)

    End Sub

    Above example is on WIN XP (Home), modify as necessary for your version of Windows.

    HTH
    Attached Images Attached Images

  3. #3
    Bronze Lounger
    Join Date
    Nov 2001
    Location
    Arlington, Virginia, USA
    Posts
    1,394
    Thanks
    0
    Thanked 3 Times in 3 Posts

    Re: How to open computer management from a command (Access 2000)

    PS: Another option, use Hyperlink to Computer Mgmt, do not need to specify path to MMC.EXE. Example:

    Application.FollowHyperlink "../../../../WINDOWS/SYSTEM32/COMPMGMT.MSC"

    However, when using hyperlink (as shown above, or with command button, etc) you get warning msg as illustrated in attd graphic. At least in AXP/WIN XP you do....

    HTH
    Attached Images Attached Images

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •