Enumshares works sometimes

Aug 28, 2008
124
4
It must be my day for problems. I just posted about an issue with enumservers, and now I'm seeing weirdness from enumshares as well. If I ask it to enumerate the shares of my machine named Ancalagon, here's what I get:

enumshares /a \\Ancalagon\*
\\Ancalagon\ADMIN$
\\Ancalagon\C$
\\Ancalagon\D$
\\Ancalagon\F$

But if I ask it to enumerate the shares of my machine named Tirion, here's what I get:

enumshares /a \\Tirion\*
TCC: (Sys) The format of the specified share name is invalid.
"\\Tirion\*"

Both machines are running the same version of Windows (10 Pro x64 with all the latest updates). Both machines have network shares visible. Yet the enumshares command works for the first machine but not the second. Any ideas?
 
May 20, 2008
11,547
107
Syracuse, NY, USA
Are you sure Tirion can be found? That's the error I get if I specify a server that doesn't exist.

Code:
v:\> enumshares /a \\no_exist\*
TCC: (Sys) The format of the specified share name is invalid.
 "\\no_exist\*"
 
Aug 28, 2008
124
4
Yup. I can easily access all its shares from that very machine on which I'm running the enumshares command that's failing too. Here's a ping to demonstrate:

ping /4 tirion

Pinging tirion.attlocal.net [192.168.1.76] with 32 bytes of data:
Reply from 192.168.1.76: bytes=32 time<1ms TTL=128
Reply from 192.168.1.76: bytes=32 time<1ms TTL=128
Reply from 192.168.1.76: bytes=32 time=1ms TTL=128
Reply from 192.168.1.76: bytes=32 time=1ms TTL=128

The machine is on the network and accessible in every respect. Why the enumshares works for the one but fails for the other is a mystery to me.
 
Oct 29, 2008
90
0
Same here. enumservers returns no servers, enumshares says it can't find it. Here's me switching to a share and then enumshares telling me it can't even find the server it has as the current directory.

231G C:\Users\jbelli# \\engineering\downloads\

140G \\engineering\downloads# enumshares \\engineering
TCC: (Sys) The format of the specified share name is invalid.
"\\engineering"

140G \\engineering\downloads#
 
Aug 28, 2008
124
4
Same here. enumservers returns no servers, enumshares says it can't find it. Here's me switching to a share and then enumshares telling me it can't even find the server it has as the current directory.

231G C:\Users\jbelli# \\engineering\downloads\

140G \\engineering\downloads# enumshares \\engineering
TCC: (Sys) The format of the specified share name is invalid.
"\\engineering"

140G \\engineering\downloads#

Still broken here for me on multiple machines. Some support or a fix would be nice.
 

Charles Dye

Super Moderator
Staff member
May 20, 2008
4,497
91
Albuquerque, NM
prospero.unm.edu
You may need to log on to the target machine before ENUMSHARES will work.

Rex: Here's a feature suggestion I truly don't care about, for a command ditto:

Add options /L:user and /LP:password to ENUMSHARES. If both are specified, map \\target\IPC$ before enumerating shares and unmap it afterwords. If /L:user is specified but the password is '*' or missing, prompt the user for a password, then proceed as above.
 
Aug 28, 2008
124
4
You may need to log on to the target machine before ENUMSHARES will work.

Rex: Here's a feature suggestion I truly don't care about, for a command ditto:

Add options /L:user and /LP:password to ENUMSHARES. If both are specified, map \\target\IPC$ before enumerating shares and unmap it afterwords. If /L:user is specified but the password is '*' or missing, prompt the user for a password, then proceed as above.

For the record, repeating the test right now, I am logged on to both of the same two machines using the same account name. My main machine (Ancalagon) is even connected to network shares hosted by the other machine (Tirion). And yet when I ask TakeCommand to enumerate shares, it gives me the same error message. I'm as logged on as I know how to be.
 
May 20, 2008
11,547
107
Syracuse, NY, USA
I'd be trying to figure out how the two machings differ (OS, services, ...) and whether that matters.
 
Aug 28, 2008
124
4
I'd be trying to figure out how the two machings differ (OS, services, ...) and whether that matters.

Both running Windows 10 x64 Pro with all the latest updates. As to services, all the networking is configured the same. I'm not sure which other services might be relevant. Any suggestions?
 
May 20, 2008
11,547
107
Syracuse, NY, USA
Both running Windows 10 x64 Pro with all the latest updates. As to services, all the networking is configured the same. I'm not sure which other services might be relevant. Any suggestions?
No specific suggestions. You can get easy-to-compare (?) lists of the running services on each machine with this command.

Code:
wmiquery /a . "Select DisplayName from Win32_service where Started='True'" | sort
 
May 20, 2008
11,547
107
Syracuse, NY, USA
Try this. It's quite similar to "ENUMSHARES /A". By example ...

Code:
d:\tc26> net view /all \\zz
Shared resources at \\zz



Share name  Type   Used as  Comment

-------------------------------------------------------------------------------
ADMIN$      Disk            Remote Admin
C$          Disk            Default share
E$          Disk            Default share
F$          Disk            Default share
G$          Disk            Default share
H$          Disk            Default share
HP$         Print           HP LaserJet 1020
I$          Disk            Default share
IPC$        IPC             Remote IPC
J$          Disk            Default share
K$          Disk            Default share
L$          Disk            Default share
P$          Disk            Default share
print$      Disk            Printer Drivers
S$          Disk            Default share
T$          Disk            Default share
U$          Disk            Default share
Users       Disk
V$          Disk            Default share
The command completed successfully.
 
May 20, 2008
11,547
107
Syracuse, NY, USA
Funny! I just saw this:

Code:
[ATTACH type="full"]2996[/ATTACH]
1595080618953.png
 
Aug 28, 2008
124
4
The new view command (thanks for that tip, vefatica!) works correctly and lists all the shares available. I've generated lists of services as suggested, and while there are differences none of them stand out to me as problematic. All the network services are the same, for example. Any suggestions as to what I should be seeking in that list?
 
Aug 28, 2008
124
4
Coming back to this thread almost a year later, I can provide an interesting update. The ENUMSERVERS command still fails miserably, everywhere (i.e., on every network I try), always failing to return any names. However, the ENUMSHARES command now seems to work. I don't know if that's a TakeCommand thing or a Windows thing. Any hope that ENUMSERVERS may someday work?

P.S. The ver /r command returns the following in case that's helpful:

TCC 27.01.23 x64 Windows 10 [Version 10.0.19042.985]
TCC Build 23 Windows 10 Build 19042
 
Similar threads
Thread starter Title Forum Replies Date
Phileosophos Confusion with ENUMSHARES Support 18
S @enumservers and @enumshares issues Support 1
T VIEW only works from command line Support 14
D Alias with setdos no longer works Support 21
Dmitry L. Kobyakov Fixed The SETARRAY /R command works incorrectly with cyrillic files Support 2
Joe Caverly .BAT works in TCC-RT 25, but not in TCC-RT 26 Support 4
I findstr works in cmd but not in tcc Support 5
Dmitry L. Kobyakov WAD Start /pgm "name.htm" works improperly Support 4
Joe Caverly Works with CMD.EXE, no output with TCC.EXE Support 7
Joe Caverly Works in debugger, not from cmd line Support 1
M "less" program that works in TC 18 Support 12
Joe Caverly Echo message works without the space? Support 3
cxxl dir /s works in mysterious ways :( Support 4
J WAD setarray "/f" only works on first one Support 1
M Console-Mode (*.exe) works in TCC, not in TCMD Support 2
redwdc btm won't run in ver. 17 but works in ver. 16 Support 11
I How to? Bat Works but BTM Doesn't Support 6
vefatica Alias works differenltly v16 vs. v17 Support 13
C FFind /w works but FFind /= doesn't? Support 2
R Drag to BTM no longer works in Windows 8.1 Support 10
Frank @replace works case sensitive Support 5
D TPIPE works without being in path, but not V; aemail Support 8
noahcoad c:/hello.txt works in cmd.exe but not tcc.exe Support 1
C .bat files works in cmd.exe, not in TCMD Support 6
K Ctrl-D alias no longer works Support 4
R %+ works differently after upgrade Support 3
Joe Caverly Clearing a section of the screen works in CMD, not in TC Support 2
vefatica _CMDLINE in TCEXIT (only sometimes) Support 16
T Everything install forced (sometimes) Support 2
MickeyF Why does my tcstart.btm sometimes terminate tcc.exe? Support 4
WavSlave Fixed Escaping out of SELECT sometimes still executes the command Support 2
S dir for ftp connection - missing files sometimes Support 1
S Fixed @formatnc sometimes mishandles minus sign Support 2
C MD / RD sometimes causing TCC to lockup Support 2
T TCEXIT sometimes not called in TCMD Support 0

Similar threads