Jump to content
Sign in to follow this  
RìggníX

Check shared folders

Recommended Posts

RìggníX

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

Share this post


Link to post
Share on other sites
ptrex

@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

Share this post


Link to post
Share on other sites
RìggníX

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

Share this post


Link to post
Share on other sites
RìggníX

sry for double post, but i need to get a solution....

come on "pro's" :whistle:

/signed


greetz, RìggníXBiTrAtE.tk

Share this post


Link to post
Share on other sites
Hasher

Post # 2 is the solution ;-) You just need to learn how to use it


Firefox's secret is the same as Jessica Simpson's: its effortless, glamorous style is the result of — shhh — extensions!

Share this post


Link to post
Share on other sites
RìggníX

i tried it, but i've now idea how it could work...

could you please help me??


greetz, RìggníXBiTrAtE.tk

Share this post


Link to post
Share on other sites
RìggníX

it works if i "search" it by GetObj() , but if there are no shared files, it takes a long time to continue the script... so my program is very weak....

some1's got an idea to check it different??

/signed


greetz, RìggníXBiTrAtE.tk

Share this post


Link to post
Share on other sites
ChrisL

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

Share this post


Link to post
Share on other sites
RìggníX

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

Share this post


Link to post
Share on other sites
RìggníX

hmm....

now i tried it with the Auto3Lib func _NetShare_NetShareCheck() , but it also just works on the pc it's running on.

i tried it on 3 different pc's with disabled firewall...

what am i doing wrong???


greetz, RìggníXBiTrAtE.tk

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  

×