-
Jan 15th, 2009, 08:43 AM
#1
Thread Starter
PowerPoster
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.
-
Jan 16th, 2009, 10:35 AM
#2
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.
-
Jan 16th, 2009, 11:20 AM
#3
Thread Starter
PowerPoster
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
-
Feb 12th, 2009, 07:24 AM
#4
Lively Member
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,,
-
Feb 12th, 2009, 12:43 PM
#5
Re: folder security
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
-
Feb 12th, 2009, 09:39 PM
#6
Re: folder security
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:
'-- Set reference to Capicom Library via menu project->references
Private fso As New FileSystemObject
Dim StrPathName As String, StrCreator As String, strName As String
Private Sub Command1_Click()
'-- The separator of PathName and Creator of file
'-- Change it to what you like
Separator = "koolsid"
'-- lets say Path is stored in StrPathName
'-- lets say Creator of file is stored in StrCreator
Encryptdata.Algorithm = CAPICOM_ENCRYPTION_ALGORITHM_AES
Encryptdata.Algorithm.KeyLength = CAPICOM_ENCRYPTION_KEY_LENGTH_MAXIMUM
'-- Set the encryption/decryption key
Encryptdata.SetSecret ("koolsidencryption")
Encryptdata.Content = StrPathName
'-- Encrypt Path
TempEncryptedPath = Encryptdata.Encrypt(CAPICOM_ENCODE_BASE64)
Encryptdata.Content = StrCreator
'-- Encrypt Creator of file
TempEncryptedCreator = Encryptdata.Encrypt(CAPICOM_ENCODE_BASE64)
'-- Set the filename (Save it an extention .dll to Fool users)
strName = App.Path & "\system\MakeMeRain.dll"
'-- Ensure that the output is in one line as capicom splits it into 3 lines
EncryptedPath = Replace(TempEncryptedPath, vbNewLine, "")
EncryptedCreator = Replace(TempEncryptedCreator, vbNewLine, "")
With fso
Set strm = .OpenTextFile(strName, ForAppending) '-- Adds data at the end of File
With strm
.Write vbCrLf & Trim(EncryptedPath) & Separator & Trim(EncryptedCreator)
End With
End With
MsgBox "Data Saved", , "Success"
End Sub
A good exercise for the Heart is to bend down and help another up...
Please Mark your Thread "Resolved", if the query is solved
MyGear:
★ CPU ★ Ryzen 5 5800X
★ GPU ★ NVIDIA GeForce RTX 3080 TI Founder Edition
★ RAM ★ G. Skill Trident Z RGB 32GB 3600MHz
★ MB ★ ASUS TUF GAMING X570 (WI-FI) ATX Gaming
★ Storage ★ SSD SB-ROCKET-1TB + SEAGATE 2TB Barracuda IHD
★ Cooling ★ NOCTUA NH-D15 CHROMAX BLACK 140mm + 10 of Noctua NF-F12 PWM
★ PSU ★ ANTEC HCG-1000-EXTREME 1000 Watt 80 Plus Gold Fully Modular PSU
★ Case ★ LIAN LI PC-O11 DYNAMIC XL ROG (BLACK) (G99.O11DXL-X)
★ Monitor ★ LG Ultragear 27" 240Hz Gaming Monitor
★ Keyboard ★ TVS Electronics Gold Keyboard
★ Mouse ★ Logitech G502 Hero
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|