T
TDM
Is there any way to use WMI to disable a COM port similar to a right
click/Disable from the Device Manager ?
TIA
TDM
click/Disable from the Device Manager ?
TIA
TDM
TDM said:Walter,
I actually already tried that, but when trying to use the SetPowerState
Method, I get a type mismatch. The documentation I have on this method
comes from the WMI Object browser from M$ and fails to elaborate on the
definintion for "Time", nor have I found any samples via google, they
simply say DateTime format, but everything I have tried is failing.
Perhaps you can elaborate some ?
uint32 SetPowerState(
[in] uint16 PowerState,
[in] datetime Time
);
SetPowerState defines the desired power state for a logical device and
when a device should be put into that state. The desired power state is
specified by setting the PowerState parameter to one of the following
integer values: 1="Full Power", 2="Power Save - Low Power Mode", 3="Power
Save - Standby", 4="Power Save - Other", 5="Power Cycle" or 6="Power Off".
The Time parameter (for all state changes, except 5, "Power Cycle")
indicates when the power state should be set, either as a regular
date-time value or as an interval value (where the interval begins when
the method invocation is received). When the PowerState parameter is equal
to 5, "Power Cycle", the Time parameter indicates when the device should
power on again. Power off is immediate. SetPowerState should return 0 if
successful, 1 if the specified PowerState and Time request is not
supported, and some other value if any other error occurred. In a
subclass, the set of possible return codes could be specified, using a
ValueMap qualifier on the method. The strings to which the ValueMap
contents are 'translated' may also be specified in the subclass as a
Values array qualifier.
PowerState
<description missing>
Time
<description missing>
Walter said:Hi there,
Look for SetPowerState() inside Win32_SerialPOrt.
But you have to use the CIM_SerialController namespace to trigger this
action
Thank you
From
Walter
Walter said:Look for SetPowerState() inside Win32_SerialPOrt.
But you have to use the CIM_SerialController namespace to trigger this
action