Kinook Software Forums

Kinook Software Forums (
-   [VBP] General Discussion (
-   -   Kill session (

tan125 03-30-2009 09:48 AM

Kill session
Sometimes I get Access Denied errors when trying to move/rename/delete folders because there are open sessions on the folders or files in question. If I go to Computer Management|System Tools|Shared Folders and kill any relevant open sessions/files out there, that works fine; then I can do when I need to do. Is there a way to do this in VBP?

kinook 03-30-2009 10:15 AM

Searching on google for

computer management automate shared folders disconnect all sessions

The cached link for the second result

Suggests two possibilities.

VBScript (from a Run Script action):

Set objConnection = GetObject("WinNT://computername/LanmanServer")
Set colSessions = objConnection.Sessions

For Each objSession in colSessions

or from a Run Program action:

net session \\computername /delete /y

All times are GMT -5. The time now is 07:27 AM.

Copyright 1999-2019 Kinook Software, Inc.