Jump to content

Check shared folders


Recommended Posts

hi

i want to check, if a network computer with known ip has shared at least 1 folder, because a want to open it with

Run("explorer \\" & $ip)oÝ÷ Ú+kçb·­«­¢+Ù¥ÉÑM¥é oÝ÷ Ù»­×hzÉ÷öÜ(®L"¶Þ·
+­ljëh×6InetGetSize()

also doesn't work.

any ideas??

greetz, RìggníXBiTrAtE.tk

Link to comment
Share on other sites

@RìggníX

maybe this might help you

$strComputer = "." ;Your IP here
 $objWMIService = ObjGet("winmgmts:" _
    & "{impersonationLevel=impersonate}!\\" & $strComputer & "\root\cimv2")

 $colShares = $objWMIService.ExecQuery("Select * from Win32_Share")

For $objShare in $colShares
    consolewrite ("Allow Maximum: " & $objShare.AllowMaximum   &@CR )
    consolewrite ("Caption: " & $objShare.Caption   &@CR )
    consolewrite ("Maximum Allowed: " & $objShare.MaximumAllowed&@CR )
    consolewrite ("Name: " & $objShare.Name   &@CR )
    consolewrite ("Path: " & $objShare.Path   &@CR )
    consolewrite ("Type: " & $objShare.Type   &@CR )
    consolewrite ("---------------------------------"&@CR)
Next

regards

ptrex

Link to comment
Share on other sites

hmm... i don't no how i could use this.... (i'm a noob :whistle: )

but i think it should work with DirGetSize() somehow...

in the help file there's an exaple with the path \\10.0.0.1\h$ . so i think it should be possible to check if \\10.0.0.1 exists...

/signed

greetz, RìggníXBiTrAtE.tk

Link to comment
Share on other sites

hmm... i don't no how i could use this.... (i'm a noob :whistle: )

but i think it should work with DirGetSize() somehow...

in the help file there's an exaple with the path \\10.0.0.1\h$ . so i think it should be possible to check if \\10.0.0.1 exists...

/signed

The example in the help file shows a complete path to a shared folder, in your example you are not specifying a final folder just a path to a computer, so there is no way dirgetsize is going to work.

If you knew what the shared folder was then you could use this method but if you don't and you just want a list of shared folders whatever they may be then you need the example in the second post

Link to comment
Share on other sites

well, it works with objGet() ...

but:

it just works with the pc it's running on. if you try it with other pc's in the LAN, it will always return, that it's no object...

so that's not the solution.

Edited by RìggníX

greetz, RìggníXBiTrAtE.tk

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...