How do I get a list of connected network computers

I am using jscript and want to get a list of the connected computers. Currently, I hard-code those but would like it to be dynamic because it changes.

	//Populate shares combo box
	var computers = [
		"\\\\AMD",
		"\\\\Desktop",
	]
	var shares = [];
	for (i = 0; i < computers.length - 1; i++) {
		var folderEnum = DOpus.FSUtil.ReadDir(computers[i], "s");
		while (!folderEnum.complete) {
			var item = folderEnum.Next();
			if (item.is_dir) {
				dlg.Control("destinationCombo").AddItem(item);
				shares.push(item);
			}
		}
	}

I would like to replace this part with something that detects the other computers when it runs

	var computers = [
		"\\\\AMD",
		"\\\\Desktop",
	]

Try using ReadDir to enumerate the /network folder, I think it should work to return a list of servers (assuming they're enumerable).

That works using the s flag. It gives more than just folders so I will need to filter it.

Thanks