Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

twapi::get_client_share_info

68 views
Skip to first unread message

ILya

unread,
May 3, 2017, 3:50:44 AM5/3/17
to
Until a few days ago I was using the command [twapi::get_client_share_info SHAREPATH -opencount -remoteshare] to get a name of a remote share on our organization's server. To get the shares I use [twapi::get_logical_drives -type remote]

At some time the IT dept. changed the server and from this point all the attempts to get the names of the mappings to this server (R:, W:, Z:) return a message "This network connection does not exist".

When I connect manually to a share drive I can perform the full access actions - create a file, write to it, save it, delete it. So, for the IT people there is no problem.

[errorInfo ] says:
This network connection does not exist.
while executing
"Twapi_NetUseGetInfo "" $local"
(procedure "twapi::get_client_share_info" line 61)
invoked from within
"twapi::get_client_share_info R: -opencount -remoteshare"

What the Twapi_NetUseGetInfo does? Why it can't see the connection? What can I say to the IT?

Twapi ver - 1.0
TCL 8.4 (can't be upgraded because of IXIA)

ILya

unread,
May 3, 2017, 4:28:08 AM5/3/17
to
On PC with TCL 8.6 and twapi 4.1.27 I performed the same test.
Excluding a change from [get_logical_drives] to [find_logical_drives], I get the same result:

Share 'R:' not found. This network connection does not exist.
while executing
"win32_error 2250 "Share '$sharename' not found.""
(procedure "twapi::get_client_share_info" line 49)
invoked from within
"twapi::get_client_share_info R: -opencount -remoteshare"

Thanks in advance,
Ilya

Harald Oehlmann

unread,
May 3, 2017, 4:57:00 AM5/3/17
to
Ashok may answer.

But I suppose, more info is required (for him).
So could you open a command prompt (cmd.exe) and share the output of
"net use"?

Harald

ILya

unread,
May 3, 2017, 5:26:49 AM5/3/17
to
C:\Users\ilya_g>net use
New connections will be remembered.


Status Local Remote Network

-------------------------------------------------------------------------------
M: \\prod-svm1\users_home\ilya_g
Microsoft Windows Network
R: \\prod-svm1\temp Microsoft Windows Network
Disconnected V: \\at-labate-xp\logs Microsoft Windows Network
W: \\prod-svm1\radapp Microsoft Windows Network
X: \\prod-svm1\tds Microsoft Windows Network
OK Y: \\172.17.130.77\test Microsoft Windows Network
Z: \\prod-svm1\radapp\sys Microsoft Windows Network
The command completed successfully.

(System32) 26 % twapi::get_client_shares -level 0
{-localdevice -remoteshare} {{Y: {\\172.17.130.77\test}} {V: {\\at-labate-xp\logs}}}
(System32) 28 % twapi::find_logical_drives -type remote
M: R: V: W: X: Y: Z:

Harald Oehlmann

unread,
May 3, 2017, 5:35:17 AM5/3/17
to
Ok. So if there is nothing in the "Status" column, it is not shown up.

I personally have the experience, that I have to open once a folder in a
share so some applications find the share (Thunderbird calender and
other applications). So maybe, those shares without status are in an
unknown state.
Maybe, you should try to do a glob on them to get them in the OK state:
foreach drive [twapi::find_logical_drives -type remote] {catch {glob
$drive\\*}}

Just an idea,
Harald

ILya

unread,
May 3, 2017, 7:00:53 AM5/3/17
to
glob doesn't help

I spoke with the IT person. He asked me about the protocol we use to access the storage (\\prod-svm1) - SBM or SAMBA. Do you know?

The storage is not a Windows PC, but a Unix machine.

Harald Oehlmann

unread,
May 3, 2017, 7:36:23 AM5/3/17
to
Am 03.05.2017 um 13:00 schrieb ILya:
> glob doesn't help

Sorry, was just a try...

>
> I spoke with the IT person. He asked me about the protocol we use to access the storage (\\prod-svm1) - SBM or SAMBA. Do you know?

SAMBA is an SMB server, so there is not so much difference. TCL (and
TWAPI) uses the Windows stuff.

> The storage is not a Windows PC, but a Unix machine.

This is o.k.

I wonder why there is no status...

ILya

unread,
May 3, 2017, 7:49:57 AM5/3/17
to
I guess that the paranoid IT dept closed the sharing "access" to their server. Therefor [twapi::find_logical_drives] does the job and [twapi::get_client_shares] / [twapi::get_client_share_info] do not.

As I see the situation, I have to work with [net use] and get the {Drive: \\server\location} from it's respond.

pal...@yahoo.com

unread,
May 4, 2017, 8:25:57 AM5/4/17
to
ILya,

Could you try twapi::wnet_connected_resources and see if that works better?

/Ashok

pal...@yahoo.com

unread,
May 4, 2017, 8:31:13 AM5/4/17
to
And while you are at it, also try

twapi::get_client_shares -level 0

(i.e. explicitly specify -level 0 as that takes a slightly different code path)

ILya

unread,
May 7, 2017, 3:34:41 AM5/7/17
to


>
> twapi::get_client_shares -level 0
>

Nop!
(System32) 2 % twapi::get_client_shares -level 0
{-localdevice -remoteshare} {{Y: {\\172.17.130.77\test}}}


> >
> > Could you try twapi::wnet_connected_resources and see if that works better?
> >
Much better:
(System32) 3 % twapi::wnet_connected_resources
{M: {\\prod-svm1\users_home\ilya_g}} {R: {\\prod-svm1\temp}} {W: {\\prod-svm1\radapp}} {X: {\\prod-svm1\tds}} {Z: {\\prod-svm1\radapp\sys}} {Y: {\\172.17.130.77\test}}

But this command doesn't exist in twapi's package 1.0 .
Do you remember which package works with 8.4 and has the [wnet_connected_resources]?

pal...@yahoo.com

unread,
May 7, 2017, 4:22:37 AM5/7/17
to
The last version of twapi to support 8.4 was 2.2.3. wnet_connected_resources was added in 4.1 which is several years old already though it is the most recent release. You can see the full version history at http://twapi.sourceforge.net/v4.1/versionhistory.html

I am curious as to why you are on twapi 1.0 (which is more than 15 years old at this point). Tcl 8.4 is even older.

ILya

unread,
May 7, 2017, 5:00:01 AM5/7/17
to
The IXIA network analyzer supports TCL 8.3 and 8.4... So, about 20 Automatic Testers are stucked on 8.4..
In new Testers we use 8.6, of course.

Anyway, thank you and Harald for the help.
Ilya

0 new messages