Kinook Software Forums

Go Back   Kinook Software Forums > Visual Build Professional > [VBP] General Discussion

Thread Tools Rate Thread Display Modes
Old 03-30-2009, 08:48 AM
tan125 tan125 is online now
Registered User
Join Date: 08-30-2007
Location: PA
Posts: 15
Send a message via Yahoo to tan125
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?
Reply With Quote
Old 03-30-2009, 09:15 AM
kinook kinook is online now
Join Date: 03-06-2001
Location: Colorado
Posts: 5,826
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
Reply With Quote

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

All times are GMT -5. The time now is 07:45 PM.

Copyright 1999-2021 Kinook Software, Inc.