.shi2_permissions = &H1 'ACCESS_READ
已经是只读了吧?

解决方案 »

  1.   

    上面的代码就是用于WIN2000以上的.我的机器就是2000.shi2_permissions = &H1 'ACCESS_READ
    已经是只读了吧?(我也这么想,可是行不通)
      

  2.   

    NT always uses user-level security.shi2_permissions structure member will be ignored on a server running user-level security. To setup a FAT share that allows Everyone only "Read" access, you have to setup a security descriptor with level 502 and set shi502_security_descriptor structure member with a security descriptor that allows Everyone only read access.If you need more detailed information, feel free to let me know.Best Regards,Parker Zhang.
      

  3.   

    Private Sub Command3_Click()
    Path = "c:\aaa"
    Shell "attrib +r " & IIf(Dir(Path, vbDirectory) <> "", Path, ""), vbHide
    End Sub