[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 463
  • Last Modified:

incrept or hide some files using vb

Dear Experts

I want to incrept or hide some files using vb application then show or decrept them using a password

plese advice
0
omarmf
Asked:
omarmf
  • 4
  • 3
  • 3
  • +2
3 Solutions
 
_lv_Commented:
Seems to me, that advice won't help you. You need a WHOLE SOLUTION ON THE TRAY.
0
 
gecko_au2003Commented:
This question needs to be broken into more questions !! That way you can solve the parts you get stuck on or actually need help with in chunks and then you can put it together in the end !
0
The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

 
omarmfAuthor Commented:
I want simply the simplest way to make some files unreachable for others

the idea only
0
 
mushu999Commented:
There is NO WAY to prevent a person sitting in front of the computer that has access to the keyboard and disk drive from getting access to any file on the drive. You can, however, encrypt a files CONTENTS to prevent them from reading it. Is that what you are looking for perhaps? You can also obscure the location, perhaps, but everybodys knows: security by obscurity is never works. Finally, if you have Admin rights you can put files under the Admin profile and no other users will have access to those files when they are logged in...but as I said earlier, they could always boot up on an NTFS floppy disk and access the entire drive anyway (if they had the diskette and if they knew how and if they knew what they were looking for...)
0
 
mushu999Commented:
One more thing: it is possible to mark a sector on the hard drive as being bad, then use direct disk reads/writes to put file data there. Some viruses used to use that method to hide, since then there are no entries in the FAT or Directory. But, almost all antivirus software will notice those direct disk writes to a bad sector and will flag it as "virus-like activity".

That leads to the real question on everybody's mind: what are you actually trying to accomplish? Perhaps we could give you a good solution if you told us the background of the problem you are trying to solve.
0
 
omarmfAuthor Commented:
Ok

 the thing is simply i want to make an application the=at helps to make somefiles unaccesable, we should be able to access them via our application

i think the best whay is to put the file in a table fiel BLOB so the user hav to load and create a file from this field, so i think that know i came to a more exact quistion

can i make this with access or i should use SQL server ??
0
 
vinnyd79Commented:
This example uses 6 Textboxes and a command button. Text1 is used to receive the scan. If Text1 has the focus you can scan the serial and it should appear in Text1.  Also you should make sure your scanner is programmed to send a carriage return after the scan.



' add reference to Microsoft Excel Object Library

' declarations area of form
Dim xl As New Excel.Application
Dim wb As Excel.Workbook, ws As Excel.Worksheet
Dim x As Integer
Dim CurrentFile As String


Private Sub Text1_KeyPress(KeyAscii As Integer)
If KeyAscii = vbKeyReturn Then
    CurrentFile = ""
    Call CreateExcelFile("C:\results", Text1.Text)
End If
End Sub

Private Sub CreateExcelFile(DirLoc As String, BarCode As String)
    If Dir(DirLoc, vbDirectory) = "" Then MkDir (DirLoc)
    If Right$(DirLoc, 1) <> "\" Then DirLoc = DirLoc & "\"
   
    CurrentFile = DirLoc & BarCode & ".xls"
   
    If Dir(CurrentFile) <> "" Then
        DisplayValues
    Else
        Set wb = xl.Workbooks.Add
        wb.SaveAs (CurrentFile)
        wb.Close
        Set wb = Nothing
    End If
   
    Text2.SetFocus
End Sub

Private Sub Command1_Click()
CurrentFile = ""
Call CreateExcelFile("C:\results", Text1.Text)
SaveValues
End Sub

Private Sub SaveValues()
Set wb = xl.Workbooks.Open(CurrentFile)
Set ws = wb.Sheets("Sheet1")
ws.Cells(1, 1).Value = Text2.Text
ws.Cells(2, 1).Value = Text3.Text
ws.Cells(3, 1).Value = Text4.Text
ws.Cells(4, 1).Value = Text5.Text
ws.Cells(5, 1).Value = Text6.Text
wb.Save
wb.Close
Set wb = Nothing
xl.Quit
Set xl = Nothing

MsgBox "all done"

End Sub


Private Sub DisplayValues()
Set wb = xl.Workbooks.Open(CurrentFile)
Set ws = wb.Sheets("Sheet1")
Text2.Text = ws.Cells(1, 1).Value
Text3.Text = ws.Cells(2, 1).Value
Text4.Text = ws.Cells(3, 1).Value
Text5.Text = ws.Cells(4, 1).Value
Text6.Text = ws.Cells(5, 1).Value
wb.Close
Set wb = Nothing
xl.Quit
Set xl = Nothing
End Sub
0
 
vinnyd79Commented:
Duhhh.  I had 2 windows open and posted to the wrong one. Disregard the above.
0
 
mushu999Commented:
Wouldn't it be easier to store the file as an encrypted data file, then when the user runs your app and enteres the proper password, it will "unlock" that data file and create it normally? The problem is that once the file is unlocked, the user can then copy it outside of your program and do whatever they want with it.
0
 
omarmfAuthor Commented:
Ok so is there any reference or component to use, better then impleminting the alghorthm

thank you
0
 
_lv_Commented:
There are lots of them.
Take a look at:
http://rspsoftware.clic3.net/rspencrypt.htm

or more generally at:
http://www.google.com/search?hl=en&lr=&q=Visual+Basic+encryption+ActiveX+control

But, like i said before - seems to me, that you need a whole solution on the tray, because your next question will be "how to make it work?" And so on, and so on, untill someone
will give you a complete solution (sample, working application).
0
 
mushu999Commented:
Do you want to make the _entire_ file invisible to the user at the file-system level? So they cannot even see it in WindowsExplorer or doing a DIR command at the prompt? Or do you just want them to not be able to run a program, but it is ok to see it? Or is this used for data files only?

If it is ok for the user to see that the file is there, you can easily take out a chunk of the file and store that ina  database field, then they can use your program to replace that chunk and launch the file. But again, after you "repair" the file, the user can then make a copy of it and defeat your whole scheme...

You are slowly telling us more and more, but we need even more info to help you. What is your vision for how your app would work, and give an example user session as if you had it written already.
0

Featured Post

Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

  • 4
  • 3
  • 3
  • +2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now