Refreshing Network Neighborhood

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Refreshing Network Neighborhood

Louis Sumberg-2
Is there a way to tell Windows to refresh what drives and such that the pc
is connected to?  This is related to "stress testing" a Shell namespace app
that Steve Waring and I have been working on.

The problem can be easily seen in Windows Explorer.  I'll navigate to a
drive on a remote pc (e.g., \\Basement\c) under Network Neighborhood.  Then
I unplug my network connection and startup Explorer again -- Basement is
still there, although now it's not accessible (which is correct).  If I play
around for awhile, at some point Windows figures out the remote drive is not
there and stops showing it when I expand the Network Neighborhood node.

At that point, I plug the network connection back in and it's the same type
of thing (sort of in reverse) -- the remote drive doesn't show for quite
awhile (or until I reboot).  Pressing F5 (refresh) in Explorer doesn't help.
I'm running Win98.

Thanks.

-- Louis


Reply | Threaded
Open this post in threaded view
|

Re: Refreshing Network Neighborhood

Chris Uppal-3
Louis Sumberg wrote:

> Is there a way to tell Windows to refresh what drives and such that the pc
> is connected to?  This is related to "stress testing" a Shell namespace
app
> that Steve Waring and I have been working on.

This is very definitely not my field, but you *might* get results by using
the command line either to pause/continue the workstation service:

    net pause workstation
    net continue workstation

or to stop/restart the computer browser (which I *think* is the M$-stupid
name for the thing and protocol that maintains a list of the locally
available machines):

    net stop "computer browser"
    net start "computer browser"

or perhaps you should stop/restart the workstation service.

I repeat the warning that I don't really know what I'm talking about here!
And there would almost certainly be side-effects.

If one of the above works then presumably you'd want to run them from
Dolphin, you can mess around with crtlibrary>>_spawnvp:blah:blah:, but I
prefer to add use to the much simpler standard C library routine system(),
and then use that (at the cost of some flickering):

    CRTLibrary default system: 'net pause workstation'.

where CRTLibary>>system: is defined as:

-----------------------------
system: aString
    "Spawn a new process to execute the given command line.

         int system(char *cmdline);

    Implementation Note: Overlapped so as to block only the calling process,
as the
    spawned external process may run for a lengthy time.
 "

    <overlap cdecl: sdword system lpstr>
   #CUadded.
    ^self invalidCall
"
[CRTLibrary default system: 'command.com'] fork

-----------------------------

    -- chris


Reply | Threaded
Open this post in threaded view
|

Re: Refreshing Network Neighborhood

L. M. Rappaport
In reply to this post by Louis Sumberg-2
On Mon, 22 Jul 2002 15:49:09 -0700, "Louis Sumberg"
<[hidden email]> wrote (with possible editing):

>Is there a way to tell Windows to refresh what drives and such that the pc
>is connected to?  This is related to "stress testing" a Shell namespace app
>that Steve Waring and I have been working on.
>
>The problem can be easily seen in Windows Explorer.  I'll navigate to a
>drive on a remote pc (e.g., \\Basement\c) under Network Neighborhood.  Then
>I unplug my network connection and startup Explorer again -- Basement is
>still there, although now it's not accessible (which is correct).  If I play
>around for awhile, at some point Windows figures out the remote drive is not
>there and stops showing it when I expand the Network Neighborhood node.
>
>At that point, I plug the network connection back in and it's the same type
>of thing (sort of in reverse) -- the remote drive doesn't show for quite
>awhile (or until I reboot).  Pressing F5 (refresh) in Explorer doesn't help.
>I'm running Win98.
>
>Thanks.
>
>-- Louis
>
 
Network Neighborhood -> View -> Refresh.  If the mapped drive is no
longer available it will show with a red slash through the icon and
you will not be able to access files on that drive.  

--
Larry
[hidden email]


Reply | Threaded
Open this post in threaded view
|

Re: Refreshing Network Neighborhood

Chris Uppal-3
L. M. Rappaport wrote:

> Network Neighborhood -> View -> Refresh.

Your, and other peoples', mileage will obviously vary, but for me that has
*never* worked.  As far as I can guess (note that verb well) refresh only
causes the UI to go back to the OS for the data, but if the OS hasn't
changed anything...

    -- chris


Reply | Threaded
Open this post in threaded view
|

Re: Refreshing Network Neighborhood

Louis Sumberg-2
> > Network Neighborhood -> View -> Refresh.
>
> Your, and other peoples', mileage will obviously vary, but for me that has
> *never* worked.

And today it didn't work either.  Thanks, Larry, for the suggestion.

Chris, thanks too, though I couldn't get the net commands to work.  I have a
feeling they're for NT.  I did get
    net view /workgroup:"My Workgroup"
to run, but it's got the same refresh problem.  I like your
CRTLibrary>>system: method (I don't know when I'll use it, but that's a
different story *s*).

Thankfully I've gotten over another obsessive compulsive day.

-- Louis


Reply | Threaded
Open this post in threaded view
|

Re: Refreshing Network Neighborhood

L. M. Rappaport
On Wed, 24 Jul 2002 00:20:28 -0700, "Louis Sumberg"
<[hidden email]> wrote (with possible editing):

>> > Network Neighborhood -> View -> Refresh.
>>
>> Your, and other peoples', mileage will obviously vary, but for me that has
>> *never* worked.
>
>And today it didn't work either.  Thanks, Larry, for the suggestion.
>
>Chris, thanks too, though I couldn't get the net commands to work.  I have a
>feeling they're for NT.  I did get
>    net view /workgroup:"My Workgroup"
>to run, but it's got the same refresh problem.  I like your
>CRTLibrary>>system: method (I don't know when I'll use it, but that's a
>different story *s*).
>
>Thankfully I've gotten over another obsessive compulsive day.
>
>-- Louis
>

Louis,

        Sorry, I missed the "Win 98".  It seems to work in Win NT and
Win 2000 (which we use here), but can't speak beyond that.  I'd have a
look at 3d party utilities, maybe at the Sunbelt site.

--
Larry
[hidden email]