Results 1 to 6 of 6

Thread: file permissions

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Jun 2006
    Posts
    93

    file permissions

    hi,
    i want to change fiile's pemissions how can i do it with vb6?
    and how can i get the windows directoy?
    how can i run some exe fom the code?
    thanks
    omer

  2. #2
    Interweb adm/o/distrator Paul M's Avatar
    Join Date
    Nov 2006
    Location
    Australia, Melbourne
    Posts
    2,306

    Re: file permissions

    What do you mean by File Permissions, exactly?

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Jun 2006
    Posts
    93

    Re: file permissions

    there is permission called Everyone and i need to change the file permission to it
    that permission allows to everyone to watch that file and use it
    and how can i change the inheritance of the file with the code?
    omer

  4. #4
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: file permissions

    Quote Originally Posted by omerg84
    and how can i get the windows directoy?
    vb Code:
    1. Private Declare Function GetWindowsDirectory Lib "kernel32" Alias "GetWindowsDirectoryA" _
    2. (ByVal lpBuffer As String, ByVal nSize As Long) As Long
    3.  
    4. Private WinDir As String
    5.  
    6. Private Sub GetWinDir()
    7.     On Error Resume Next
    8.     Dim sBuffer As String
    9.     Dim lSize As Long
    10.     Dim Rs As Recordset
    11.     sBuffer = Space$(255)
    12.     lSize = Len(sBuffer)
    13.     Call GetWindowsDirectory(sBuffer, lSize)
    14.     If lSize > 0 Then
    15.         WinDir = Left$(sBuffer, lSize - 1)
    16.     Else
    17.         WinDir = vbNullString
    18.     End If
    19.  
    20. End Sub
    As far as changing permissions goes, will all the people running your program be administrators on their machines?

  5. #5

    Thread Starter
    Lively Member
    Join Date
    Jun 2006
    Posts
    93

    Re: file permissions

    yes everyone admins,who can i change the permissions with code?

  6. #6

    Thread Starter
    Lively Member
    Join Date
    Jun 2006
    Posts
    93

    Re: file permissions

    help'please....

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width