| || |
Need to enable/disable COM ports (COM3, COM4 etc.) using VBS
I need help in disabling/enabling COM ports in my PC through QTP VBS. I saw some threads which talks about this and the solution suggested was to reset a registry value. But this gets into effect only after restarting the PC, I need to do this without rebooting my PC. I tried using WMI and found "Setpowerstate" method, but I'm not able to find out the syntax.
Can someone provide me with a sample code.
Last edited by ameehl; 07-01-2013 at 10:43 AM.
Reason: This site sucks at handling URLs and line breaks
Thank you Ameehl for your response. I tried what you had suggested by using the VBS for opening the ports. After creating a Firewall Manager object, I tried reading the ports using "GloballyOpenPorts". It is returning DCOM port, I'm pretty new to this and not sure how I can reach to COM3, COM4 etc. ports from here. Could you please get me some details.
Can someone help me with this... I have tried many options and not able to find a solution.