How to cancel windows XP idle connections?

Technical support and scripting issues

Moderators: Dorian (MJT support), JRL

Post Reply
shamigc
Junior Coder
Posts: 37
Joined: Wed Oct 22, 2003 11:38 am
Location: Monterrey, Mexico

How to cancel windows XP idle connections?

Post by shamigc » Fri May 02, 2008 4:59 pm

Hi,

I have a PC with windows XP pro and a shared folder for a small office, but frequently I get a message "... there are no more connections available ..." when more than 10 people try to access this folder, but I have detected there are some connectios idle for more than 30 minutes without file opened, How can I check every 15 minutes for idle connections and cancel them using Macro Scheduler?
:)
Thanks,
Salvador
Thanks,
Salvador Hernandez

edauthier
Pro Scripter
Posts: 84
Joined: Sun Apr 13, 2003 1:26 pm
Location: USA

Post by edauthier » Mon May 05, 2008 6:05 pm

I really like this post. This is a great use for Macro.

To strictly use Macro and no Vbscripting you will need to mimic a user by navigating thru screens, export the the sessions log and then grab your information from the log. I cannot think of a way to call the information without going to sessions in management console or utilizing Vbscript. vb scripting will use LanmanServer.

C:\%SystemRoot%\system32\compmgmt.msc


If you need specific help post back.

P.S. - look out for idle users they may have an unsaved document open and logging off the session would result in lost work.

shamigc
Junior Coder
Posts: 37
Joined: Wed Oct 22, 2003 11:38 am
Location: Monterrey, Mexico

How to cancel windows XP idle connections? with vbscripting

Post by shamigc » Mon May 05, 2008 7:19 pm

Hi,

Thanks for the information, I would like to do it with vbscript, so users that work in this server will not be interrupted with his work. How can I do it with VBscript?

Thanks,
shamigc
:)
Thanks,
Salvador Hernandez

User avatar
Djek
Pro Scripter
Posts: 147
Joined: Sat Feb 05, 2005 11:35 pm
Location: Holland
Contact:

Post by Djek » Mon May 05, 2008 7:53 pm

if you use in cmd
net session
you can see the users connected and how long they are idle.

if you make a batch like
net session > idle.txt
you can use MS to read this txt and you can use
net session \\computername /delete to disconnect the session.

Looks to me that this can be perfect be done bij MS,
hth,
Djek

shamigc
Junior Coder
Posts: 37
Joined: Wed Oct 22, 2003 11:38 am
Location: Monterrey, Mexico

Post by shamigc » Mon May 05, 2008 10:46 pm

Djek,

Thank you, the commands you game me worked all right, now I can write the code using Macro Scheduler, you solve my problem.

Thanks again,
Salvador Hernandez
:D
Thanks,
Salvador Hernandez

edauthier
Pro Scripter
Posts: 84
Joined: Sun Apr 13, 2003 1:26 pm
Location: USA

Post by edauthier » Tue May 06, 2008 12:04 am

Sal,
If your going to go the 'command' route try this also:
net config server /autodisconnect:time

This should do what you want.
Ed

shamigc
Junior Coder
Posts: 37
Joined: Wed Oct 22, 2003 11:38 am
Location: Monterrey, Mexico

Post by shamigc » Mon May 19, 2008 9:21 pm

edautier:

Thanks for your net config server /autodisconnect:time command, unfortunatelly it did not worked on my XP Pro computer.

Djek:

Thanks for your "net session \\computername /delete" command it worked all right, and I want to ask you if there is another msdos command to have the "Open Files" output, because I have detected "net session" command says some users have opened files, but when I verify which files are opened, Computer Management> Open Files, there are no opened files.

Thanks to you two,
Salvador Hernandez

edauthier
Pro Scripter
Posts: 84
Joined: Sun Apr 13, 2003 1:26 pm
Location: USA

Post by edauthier » Wed May 21, 2008 1:07 am


Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts