• 0

[VBSCRIPT ]check if TCP port is open


Question

Hi,

I have a problem: I have a script that needs to check if a tcp port is used. if its not used it shall start a program, if the port is used it should do nothing.

The tcp port I want to check is 5555.

I read something about winsock but didnt really get anywhere :s.

I could do it by using the netstat ?command and put the output in a file but thats taking to long as it needs to be done under 300ms (milisecounds).

thx in advance!

Link to comment
https://www.neowin.net/forum/topic/337251-vbscript-check-if-tcp-port-is-open/
Share on other sites

4 answers to this question

Recommended Posts

  • 0

I don't believe plain-old VBscript is capable of network I/O by itself... perhaps you meant VB?

One question though: is the TCP port you are checking local or remote? If it's local, you can simply use Winsock and try to bind to that port--if you can't bind to it, then the port is in use.

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Posts

    • Intel's next-gen desktop processors leak with a whopping number of cores by Taras Buria Intel's third-generation Core Ultra processors for desktop computers are on the way. If the latest leak is true, we are up for some significant updates in the Core Ultra 300 Series. @g01d3nm4ng0 on X posted a list of Intel's upcoming desktop processors, which includes seven SKUs ranging from entry-level Core Ultra 3 models to the flagship Core Ultra 9 with a rather whopping number of cores. According to the leak, the top-end model will feature 52 cores without hyperthreading. However, those cores are not like "classic" cores found in HEDT chips like AMD's Threadrippers. Instead, those 52 cores are divided into three categories: performance, efficiency, and low-power. The upcoming Core Ultra 9 reportedly features 16 performance cores, 32 efficiency cores, and 4 low-power cores. The cheapest Core Ultra 3 has four of each, 12 cores in total. Low-power cores are new to Intel's desktop processors. The current Core Ultra 200 chips feature the same hybrid configuration that was introduced with the 12th-gen Alder Lake chips: performance cores for demanding tasks and efficiency cores for lightweight tasks (up to 24 cores). Now, Intel wants to improve the efficiency of its chips further by adding another set of low-power cores, which were first introduced in the first-gen Core Ultra mobile chips (Meteor Lake). @jaykihn0 adds that Intel Nova Lake-S will support 8000 MT/s memory speed by default and 32 PCIe Gen 5 lanes and 16 PCIe Gen 4 lanes, totalling 48 lanes in CPU + chipset configuration. SKU P Cores E Cores LP Cores TDP Core Ultra 9 16 32 4 150W Core Ultra 7 14 24 4 150W Core Ultra 5 8 16 4 125W Core Ultra 5 8 12 4 125W Core Ultra 5 6 8 4 125W Core Ultra 3 4 8 4 65W Core Ultra 3 4 4 4 65W Today's leak aligns with previous reports about the upcoming Intel Nova Lake-S processors. However, Intel enthusiasts should probably get ready to switch platforms again, as the Nova Lake-S generation is rumored to require a brand-new LGA1954 socket.
    • My mb got a bios update but it just says... is this the fix? - Fix "AMD fTPM switch" option will be hidden. as long as set AMD CPU fTPM to Disabled - AGESA PI-1.2.0.3c released.
  • Popular Contributors

    1. 1
      +primortal
      656
    2. 2
      ATLien_0
      272
    3. 3
      +FloatingFatMan
      176
    4. 4
      Michael Scrip
      157
    5. 5
      Steven P.
      136
  • Tell a friend

    Love Neowin? Tell a friend!