Jump to content

NetShare.au3


Recommended Posts

Func __CreateShared($ShareName,$Path,$NumberAllowedConnections)
    If FileExists($Path)=0 Then Return "File Share Failed!"
    If _Net_Share_ShareAdd("",$ShareName,$STYPE_DISKTREE,$Path,"",$NumberAllowedConnections)='True' Then
        MsgBox(0,'',"File Successfully Shared!",3)
        Return "File Successfully Shared!"
    Else
        Return "File Share Failed!"
    EndIf
EndFunc

This is the function that I am using to create shares. I have used something similar before with success, but this time I am having some trouble. This function creates the share fine. If I used the _Net_Share_ShareEnum('') it sees the share. I can also see the share with other share monitoring software and also with Windows Explorer. The problem is that when I try to open access the share from another computer I get "access is denied".

Thanks!

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...