Sign in to follow this  
Followers 0
Ibrahim

Active Directory Stuff

5 posts in this topic

here is the thing,You know guys the computer management>shared folders>active session>....etc need to call it without having to start this sequence hope somebody help me to launch......Thanks

what i wanna do is create a loop that will continuously check the state of my shares sessions

I'm sorry for the double post

Share this post


Link to post
Share on other sites

Hi again,

you could use "Net session" command to see who's connected and what files they have open, also can close a connected session(s) using the same command with parameters..

Can use "net share" command to find what available shares are on a pc..

more info on net service commands Here

You can call the fsmgmt.msc snap in by using

Run(@SystemDir & "\mmc.exe /s " & @SystemDir & "\fsmgmt.msc /s")
But that doesn't get you to where you exactly want and it's not silent either...lol

Cheers

Share this post


Link to post
Share on other sites

first of all"How are u smashy" second of all i just want to call the entry without having to navigate to the group policy stuff in a loop that will tell me when there is a new session and retrieve the entries

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

I good thanks m8 :)

You can use

Run("cmd.exe /k net.exe share")oÝ÷ Ù:wp«lªÞ±ªÞ¢v©q.q©î±æ®¶­se'VâgV÷C¶6ÖBæWRö²æWBæWR6W76öâgV÷C²
to see what files are open/being accessed in your shares...

Basically use stdout to read from either console window to use the info quietly..

Cheers..

Edited by smashly

Share this post


Link to post
Share on other sites

Here is what i did,Hope u like it

#include <Process.au3>
#Include <Constants.au3>
#include <File.au3>
while @error=0
    sleep(5000)
_RunDos("Net session >c:\session.bin")
;~ MsgBox(0,"intruders",FileRead("c:\session.bin"))
$No=_FileCountLines ("c:\session.bin")
if $No > 4 Then
for $count=5 to $No-2
    $read=FileReadLine("c:\session.bin",$count)
    $read=StringTrimLeft($read,2)
    $read=StringReplace($read,"         ",")) Username: ",1)
    $read=StringReplace($read,"            ","   OS #",2)
    $read=StringTrimRight($read,19)
TrayTip("Share REsource Opened","By: (("&$read,2,2)
sleep(2000)

    Next
EndIf
WEnd

do u think i should put this in the examples section of the forum?

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  
Followers 0