WMIC

Discussion in 'Scripting' started by Marek, Apr 13, 2006.

  1. Marek

    Marek Guest

    Hi all,sorry for mybad Englisch . Can I use wmic for scripting ? I want etc.
    from one questation win32_logicaldrive use name drive and use this to second
    questation ....
    thanx
    marek g.
     
    Marek, Apr 13, 2006
    #1
    1. Advertisements

  2. Marek

    Marty List Guest

    WMIC can be used for scripting if you want to parse the text returned, but it's
    better for interactive use from the command prompt. WMIC only exposes some of
    the WMI objects, but all WMI objects can be accessed from scripting languages.

    I don't think there is a Win32_LogicalDrive, but maybe you mean
    Win32_LogicalDisk? Here is the documentation and an example in VBScript:
    http://msdn.microsoft.com/library/en-us/wmisdk/wmi/win32_logicaldisk.asp
     
    Marty List, Apr 13, 2006
    #2
    1. Advertisements

  3. Marek

    dave Guest

    WMIC CALL allows execution of the methods available to a class. Can the
    GETSECURITYDESCRIPTOR method method of win32_logicalsharesecuritysetting be
    called using WMIC? Below is the result when I try - it isn't clear how to
    pass parameters to the method from the documentation.

    Anyone have experience with this?

    TIA
    Dave

    --------------------------------------------------------------------------------------------
    wmic:root\cli>path win32_logicalsharesecuritysetting
    Caption ControlFlags Description
    Name SettingID
    Security settings of print$ 32772 Security settings of print$
    print$
    Security settings of HPOffice 32772 Security settings of HPOffice
    HPOffice
    Security settings of downloads 32772 Security settings of
    downloads downloads
    Security settings of recordings 32772 Security settings of
    recordings recordings
    Security settings of stuff (E) 32772 Security settings of stuff
    (E) stuff (E)

    wmic:root\cli>path win32_logicalsharesecuritysetting call /?

    Method execution operations.
    USAGE:

    CALL <method name> [<actual paramlist>]
    NOTE: <actual paramlist> ::= <actual param> | <actual param>, <actual
    paramlist>

    The following verb(s)/method(s) are available:

    Call [ In/Out ]Params&type Status
    ==== ===================== ======
    GetSecurityDescriptor [OUT]Descriptor(object:Win32_SecurityDescriptor)
    Implemented

    [OUT]ReturnValue(uint32)

    SetSecurityDescriptor [IN ]Descriptor(object:Win32_SecurityDescriptor)
    Implemented

    [OUT]ReturnValue(uint32)


    wmic:root\cli>path win32_logicalsharesecuritysetting call
    getsecuritydescriptor
    Executing (win32_logicalsharesecuritysetting)->getsecuritydescriptor()
    ERROR:
    Code = 0x8004102f
    Description = Invalid method Parameter(s)
    Facility = WMI
     
    dave, Jul 7, 2006
    #3
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.