Jump to content
Sign in to follow this  
pcjunki

check for open share sessions

Recommended Posts

pcjunki

is it possible to check for "open" sessions to my computer?

I would like to know when a session is active to any of the shares on my pc

the screen shot below shows where I usually check for open sessions.

if anyone can provide a function, I can try and work it from there and create my own autoit script

post-65063-0-23771400-1404415435_thumb.p

Share this post


Link to post
Share on other sites
jdelaney

Not sure of any API call, but you can do a

Run("net sessions > output.txt"), and grab the output.

You might need to prepend:

Run(@comspec & " /c net sessions > output.txt")

for the commands:

net sessions /?

Edited by jdelaney

IEbyXPATH-Grab IE DOM objects by XPATH IEscriptRecord-Makings of an IE script recorder ExcelFromXML-Create Excel docs without excel installed GetAllWindowControls-Output all control data on a given window.

Share this post


Link to post
Share on other sites
pcjunki

I went old school and created a batch file.

net session > c:\session.txt
@echo off
findstr /m "\\" c:\session.txt
if %errorlevel%==0 
(c:\session.txt)
Edited by pcjunki

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×