Hi ab.
thanks for your reply.
[color=blue]
Out of curiosity, why does the NMAP option (with multiple files on
there) NOT work?[/color]
OK, I’ll describe my approach more detailed:
Situation:
This is a company, that has ~20 retail outlet in several cities in
Germany, Austria, Swizerland.
Due to budget limitations a “real” load balancing solutions is not an
oportunity. (Citrix is on the list for years…)
So they work with several standard Terminal Servers (Win2008-R2-x64).
Currently the clients “outside” have an RDP definition file, that
arranges a “fix” combination “this PC” ↔ “TS1/2/…/n”. Login name for
the TS session = hostname of the client PC. Host names are 01,
02,…, 16
My idea:
a default mapping, according to the PC numbers:
set1: PC1, PC5, PC9, PC13 → TS1
set2: PC2, PC6, PC10, PC14 → TS2
and so on.
Then check, if TS for “my set” is up and 3389 is open: Then connect.
Otherwise try the next set, with a wrap from the last set to set1.
Autoit, as well as portqry.exe and other tools, I’ve tried all have the
issue, that in case the host is down / port is closed, it takes several
seconds, until (the Win Net API?) timeout occures. Some of the tools
(including Autoit: Opt(“TCPTimeout”,50)) allow to define a timeout in
ms, but it doesn’t seem to have any effect.
nmap would be fine, but it needs WinPcap, and several DLLs. I do not
want to install it on all the client PCs. Just using the Autoit
function “fileinstall(“C:\…
map.exe”,@tempdir & "
map.exe”,1)
doesn’t help, as nmap.exe is NOT a standalone EXE program. Beside
this, nmap doesn’t provide exit codes, that reflect the result of a
single host + single port query (that’s not the purpose, nmap was
written for)
My question:
Does anybody know a way to do a FAST check for host / port status,
that can be (ab)used for this purpose?
- FAST! Not like Autoit functions, WMI calls,
- single exe or or DLL that could be called
- no local installation (like nmap winpcap)
- nice to have: Exit code, reflecting status. outtext to be analyzed,
like NMAP is doing, is acceptable.
I also tried to search a powershell solution, with no luck so far.
http://poshcode.org/2455 was promising, but here it returns for each
and every ip / port parameter pair “false”.
Regards, Rudi.