Really hard - Genius Required for this one

S

strongr1

I guess this is going to take someone with a genius IQ to
solve this one. I have posted it in several different
forums and apparently no one has been able to figure this
one out.

If there is not a better way,I need a script or some kind
of program that will tell me if anyone is using my hard
drive so when I shutdown I do not lock anyone out.

I am told that the Windows XP pro has this feature and I
know that the data is available because we tried the
Computer Manager shared folders and it proved just a
little too complex for most of the users on our network.

I do not need anything complex, just a simple program that
only someone who is really gifted could create to present
the basic status of the hard drive to those less gifted.
While it would be nice if it were part of the shutdown
script, I can get the others to click on a desktop icon
before they shutdown and lock others out of their drive.

Your time and attention are greatly appreciated.

Strongr1
 
T

Tim Hall

Assuming i understand your needs properly, this might be a satisfactory
solution.

What about if you had a program that pingged a list of computers ip
addresses/names (usning the windows API at a interval of say 10 seconds or
even 5 mins if you wanted) and when when they all were not responding it
could trigger a shutdown via another API call. It wouldnt be too hard to
write something like that. And it would requre nothing on the users part,
and you just create it as either a service or put it int he startup group.

I guess the feasability of that would depend if you are on a LAN or are
dealing with a WAN/VPN.

Tim
 
L

LiquidJ

Tim, I think you're misunderstood the OP's question...if not, I'm really not
sure what that would accomplish.

To the OP, what you're going to need is to write an application (not sure
you can do it in script) using the NetShareEnum() function, level 2 should
do it. This will enumerate the shares on your PC, but more importantly, the
level 2 information will return to you the number of users -=connected=- to
each of those shares.


{L}
 
S

Strongr1

Tim,
You truly are in a class with Alexander Graham Bell &
Albert Einstein.
You have been able to provide the information that no one
else has.
Just one problem, while I am the office computer geek and
I do have my A+ Cert, my specialty is cad and I am nowhere
near your equal. I can handle cad problems, general
computer, operating system problems, I can program
proficiently in LISP and I have in the past programmed in
basic, but the information you provided sounds like I need
a C program. I will try to contact some friends to see if
anyone knows enough to write a program with this
information. You are super kind to have helped me get to
this point and I very much appreciate all you have done.

Thanks a bunch!

Strongr1
 
J

Joe Richards [MVP]

Check out

net session

and

net files


net session will show if anyone is currently connected to the computer.

net files will show any open files that are open by remote users.


Not really a genius level question. :blush:p
 
T

Tim Hall

Its not really that complex, at pscode.com there are a few sample progs in
Visual Basic using APIs to ping other computers, it wouldnt be too hard to
modify one to do your bidding. I wodul suggest if going for this option
waiting like 5 minutes of no activity before shutting down as they may have
had to reboot, but still need access to resources on your computer.

Joe Richards also has a good point, im not sure how well that would work in
a peer to peer environment (which i assume your in), but you could have a
program to parse the output of the net files/sessions command, or there must
be a API for that somewhere.
 
G

Guest

Thanks Joe,

You are the genius that solved my problem. I used the net
session on a desktop icon and this should be simle enough
for anyone here to understand. Looks like you are one of
the few that know the system inside out.
Thanks!!!
Strongr1

-----Original Message-----
Check out

net session

and

net files


net session will show if anyone is currently connected to the computer.

net files will show any open files that are open by remote users.


Not really a genius level question. :blush:p
message news:[email protected]...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top