BullGates Posted August 28, 2007 Share Posted August 28, 2007 I'm having a problem, could it be related to this issue? I can't close the connection with my domain servers even if I put all the objects I use = 0. Only when I close the script I can close the connections (using netstat 1 they're visible). [topic="51913"]Restrict USB Storage usage to group membership[/topic] * [topic="48699"]Using nircmd library[/topic] * Some admin notes Link to comment Share on other sites More sharing options...
jpm Posted August 29, 2007 Share Posted August 29, 2007 I'm having a problem, could it be related to this issue?I can't close the connection with my domain servers even if I put all the objects I use = 0. Only when I close the script I can close the connections (using netstat 1 they're visible).difficult to help you, I have no cristal ball.Without joking a script is really needed to see if it is related. Link to comment Share on other sites More sharing options...
BullGates Posted August 29, 2007 Author Share Posted August 29, 2007 difficult to help you, I have no cristal ball. Without joking a script is really needed to see if it is related. Sorry about that, you were right about the crystal ball Here goes the portion of code: Dim $Offline = True Dim $AllowUser = False Global $UserOnline $OfflineModeKey = "HKEY_LOCAL_MACHINE\SOFTWARE\UsbAccess" While 1 If Check_AD_Link($Offline) = False Then EndIf Sleep(180000) WEnd Func Check_AD_Link($Offline) $objConnection = ObjCreate("ADODB.Connection") ; Create COM object to AD $objConnection.Provider = "ADsDSOObject" $objConnection.Open ("Active Directory Provider") ; Open connection to AD $objRootDSE = ObjGet("LDAP://RootDSE") If @error = 0 Then $strDNSDomain = $objRootDSE.Get ("defaultNamingContext") ;Retrieve the current AD domain name (DN) If @error Then $Offline = True Else $Offline = False EndIf EndIf ConsoleWrite("Offline = " & $Offline & @CRLF) Return $Offline $objConnection.Close $objConnection = 0 EndFunc I could never get this to close the connections! [topic="51913"]Restrict USB Storage usage to group membership[/topic] * [topic="48699"]Using nircmd library[/topic] * Some admin notes Link to comment Share on other sites More sharing options...
BullGates Posted August 29, 2007 Author Share Posted August 29, 2007 Oops, I need vacations! I'm using return before the close commands! Please forget it, it's just me being lamme [topic="51913"]Restrict USB Storage usage to group membership[/topic] * [topic="48699"]Using nircmd library[/topic] * Some admin notes Link to comment Share on other sites More sharing options...
BullGates Posted September 4, 2007 Author Share Posted September 4, 2007 Oops, I need vacations! I'm using return before the close commands! Please forget it, it's just me being lamme Well, I couldn't close the connections, I've dropped using COM for this. [topic="51913"]Restrict USB Storage usage to group membership[/topic] * [topic="48699"]Using nircmd library[/topic] * Some admin notes Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now