folder security-VBForums
Results 1 to 6 of 6

Thread: folder security

  1. #1

    Thread Starter
    Frenzied Member make me rain's Avatar
    Join Date
    Sep 2008
    Location
    india/Hubli
    Posts
    1,912

    Question folder security

    i have developed a database in VB6/access
    which stores path and creator of the files
    created files MSoffice files (.doc , .xls , .cvs , .txt) in a folder.
    i can retrieve the files from with in application
    but users finds short cut to edit or delete the file from the folder directly
    can any good help please to avoid this
    or is there any data type which stores the file directly.

  2. #2
    Software Carpenter dee-u's Avatar
    Join Date
    Feb 2005
    Location
    Candon City, Ilocos Sur, Phils.
    Posts
    10,810

    Re: folder security

    I think with Access you can use the Ole Object data type to store such files though I have doubts on the capabilities of Access to store such huge files.
    Regards,


    As a gesture of gratitude please consider rating helpful posts. c",)

    Some stuffs: Mouse Hotkey | Compress file using SQL Server! | WPF - Rounded Combobox | WPF - Notify Icon and Balloon | NetVerser - a WPF chatting system

  3. #3

    Thread Starter
    Frenzied Member make me rain's Avatar
    Join Date
    Sep 2008
    Location
    india/Hubli
    Posts
    1,912

    Question Re: folder security

    yes sir.
    using access ole type, files can be stored. but limited to as good as an image or as a book.
    i must extract the file with in some window ( i mean with in access window or any other like getobject()) so as to edit the letters by the users.
    any help ....se

  4. #4
    Lively Member amolt's Avatar
    Join Date
    Aug 2006
    Location
    INDIA
    Posts
    76

    Smile Re: folder security

    Hello,

    What if you rename your each important file with .dat extension while your application is not using it, and again converting to its original extension when you are going to use.

    This is not the appropriate way to secure your files from deleting, but deletion depends upon your users choice, If he delete any of your applications file by his choice your application certainly will not work.

    Hope it helps....

    Regds,,

  5. #5
    PowerPoster Spoo's Avatar
    Join Date
    Nov 2008
    Location
    Right Coast
    Posts
    2,656

    Re: folder security

    Quote Originally Posted by make me rain
    i have developed a database in VB6/access
    which stores path and creator of the files
    created files MSoffice files (.doc , .xls , .cvs , .txt) in a folder.
    i can retrieve the files from with in application
    but users finds short cut to edit or delete the file from the folder directly
    can any good help please to avoid this
    or is there any data type which stores the file directly.
    The basic "problem" is somewhat unclear to me. Is it...

    1. Users are maliciously trying to make your app unusable by deleting files?
    2. Users inadvertently delete files rendering the app unusable?
    3. Something else?

    Spoo

  6. #6
    Super Moderator Siddharth Rout's Avatar
    Join Date
    Feb 2005
    Location
    Mumbai, India
    Posts
    11,928

    Re: folder security

    Quote Originally Posted by make me rain
    i have developed a database in VB6/access
    which stores path and creator of the files
    created files MSoffice files (.doc , .xls , .cvs , .txt) in a folder.
    i can retrieve the files from with in application
    but users finds short cut to edit or delete the file from the folder directly
    can any good help please to avoid this
    or is there any data type which stores the file directly.
    If that is the case then why don't you encrypt the data and save it to a text file. after saving it to a text file, rename the file to a dll file so that users don't mess with it... for example check this out. If you are interested, then I will post the code to decrypt the file as well...

    vb Code:
    1. '-- Set reference to Capicom Library via menu project->references
    2. Private fso As New FileSystemObject
    3. Dim StrPathName As String, StrCreator As String, strName As String
    4.  
    5. Private Sub Command1_Click()
    6.     '-- The separator of PathName and Creator of file
    7.     '-- Change it to what you like
    8.     Separator = "koolsid"
    9.    
    10.     '-- lets say Path is stored in StrPathName
    11.     '-- lets say Creator of file is stored in StrCreator
    12.    
    13.     Encryptdata.Algorithm = CAPICOM_ENCRYPTION_ALGORITHM_AES
    14.     Encryptdata.Algorithm.KeyLength = CAPICOM_ENCRYPTION_KEY_LENGTH_MAXIMUM
    15.     '-- Set the encryption/decryption key
    16.     Encryptdata.SetSecret ("koolsidencryption")
    17.    
    18.     Encryptdata.Content = StrPathName
    19.         '-- Encrypt Path
    20.     TempEncryptedPath = Encryptdata.Encrypt(CAPICOM_ENCODE_BASE64)
    21.    
    22.     Encryptdata.Content = StrCreator
    23.     '-- Encrypt Creator of file
    24.     TempEncryptedCreator = Encryptdata.Encrypt(CAPICOM_ENCODE_BASE64)
    25.    
    26.     '-- Set the filename (Save it an extention .dll to Fool users)
    27.     strName = App.Path & "\system\MakeMeRain.dll"
    28.    
    29.     '-- Ensure that the output is in one line as capicom splits it into 3 lines
    30.     EncryptedPath = Replace(TempEncryptedPath, vbNewLine, "")
    31.     EncryptedCreator = Replace(TempEncryptedCreator, vbNewLine, "")
    32.    
    33.     With fso
    34.         Set strm = .OpenTextFile(strName, ForAppending) '-- Adds data at the end of File
    35.         With strm
    36.             .Write vbCrLf & Trim(EncryptedPath) & Separator & Trim(EncryptedCreator)
    37.         End With
    38.     End With
    39.    
    40.     MsgBox "Data Saved", , "Success"
    41. End Sub
    The poster formerly known as koolsid
    A good exercise for the Heart is to bend down and help another up...
    Please Mark your Thread "Resolved", if the query is solved

    Microsoft MVP: 2011 - Till Date IMP Links : Acceptable Use Policy, FAQ

    MyGear:
    Sony VGN-FZ27G with a triple boot between (XP+Office 2003+VB6), (VISTA+Office 2007+VS2008) and (Win7+Office 2010+VS2010) || Sony VPCCB-45FN with a Win7+Office 2010+VS2010. VM: (XP+Office 2003+VB6), (VISTA+Office 2007+VS2008), (Win8+Office 2010+VS2012) || Mac Book Pro (10.6.8) with Office 2011

Posting Permissions

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



Featured


Click Here to Expand Forum to Full Width

Survey posted by VBForums.