4 Replies - 2846 Views - Last Post: 19 April 2010 - 06:43 AM Rate Topic: -----

#1 AmuletOfNight  Icon User is offline

  • D.I.C Head

Reputation: 3
  • View blog
  • Posts: 153
  • Joined: 23-July 09

Restrictions to a directory

Posted 18 April 2010 - 07:27 AM

Hello and good morning to all the dreamers (honestly I don't know what to address the community by :/), I needed to hide a directory from people. So I set out on making a program for this reason. Well, what I came up with originally is that it would create 4 directory and 4 directory's inside each one of those directory's and so on, but that wouldn't work because you need ONE MILLION directory's. So I just ended up trying to make continuous directories onside another directory but when, I ran into a 260 character directory limit. So that wouldn't work. How do I possibly go around this? I need a way to hide a directory from normal users, or restrict access to a directory.

This is the code that causes the directory exception

                Me.Height = 224
                Dim CurrentString As String
                Dim CurrentDirectory As String
                CurrentDirectory = "\"
                Do Until ProgressBar1.Value = 2000
                    CurrentString = RandomStringGenerator(RandomNumber(30, 20))
                    My.Computer.FileSystem.CreateDirectory(SelectInitialFolder.SelectedPath & CurrentDirectory & "Test")
                    CurrentDirectory = CurrentDirectory & CurrentString & "\"
                    ProgressBar1.Value = ProgressBar1.Value + 1


Is This A Good Question/Topic? 0
  • +

Replies To: Restrictions to a directory

#2 Jack Eagles1  Icon User is offline

  • Pugnacious Penguin (inspired by no2pencil)
  • member icon

Reputation: 183
  • View blog
  • Posts: 1,152
  • Joined: 10-December 08

Re: Restrictions to a directory

Posted 18 April 2010 - 07:47 AM

Well. You could create a .zip file with a password on it, so whenever a user tries to open it they need to enter a password first. You could get your program to do this automatically. For more info see here.

Otherwise you could make it a hidden directory (using attributes), but that is very easily circumventable...

There are a few other ways, but first I'd like to know why you want to hide the directory in the first place...

This post has been edited by Jack Eagles1: 18 April 2010 - 07:49 AM

Was This Post Helpful? 0
  • +
  • -

#3 AmuletOfNight  Icon User is offline

  • D.I.C Head

Reputation: 3
  • View blog
  • Posts: 153
  • Joined: 23-July 09

Re: Restrictions to a directory

Posted 18 April 2010 - 07:53 AM

View PostJack Eagles1, on 18 April 2010 - 08:47 AM, said:

Well. You could create a .zip file with a password on it, so whenever a user tries to open it they need to enter a password first. You could get your program to do this automatically. For more info see here.

Otherwise you could make it a hidden directory (using attributes), but that is very easily circumventable...

There are a few other ways, but first I'd like to know why you want to hide the directory in the first place...


Well actually, the program is going to be public. So if ANY user wants to hide a directory. Thats why I want to hide it.
Was This Post Helpful? 0
  • +
  • -

#4 Jack Eagles1  Icon User is offline

  • Pugnacious Penguin (inspired by no2pencil)
  • member icon

Reputation: 183
  • View blog
  • Posts: 1,152
  • Joined: 10-December 08

Re: Restrictions to a directory

Posted 18 April 2010 - 08:18 AM

You could encrypt the directory, and then hide it somewhere where nobody's going to like for it (like in System32). You can find a nice .net encryption file encryption program here. It will probably need a little tweeking, but you should be able to get it to encrypt your files so nobody can read them... In effect that's just as good as hiding them...


Another idea would be just to send them to a .zip file and then re-name the extension from .zip to .dll and then put the dll into system32...

As far as I know you cannot really hide a folder in the windows filesystem from a vb.net program... although I could be wrong because I once thought that it was impossible to hide a process from task manager...
Was This Post Helpful? 0
  • +
  • -

#5 r1zla  Icon User is offline

  • D.I.C Head

Reputation: 15
  • View blog
  • Posts: 142
  • Joined: 04-February 10

Re: Restrictions to a directory

Posted 19 April 2010 - 06:43 AM

To truly hide something from the operating system you would need to write a root kit, which is normally used for malicious purposes and would therefore be inappropriate for D.I.C. Not to mention the difficulty of writing a complex piece of code like that. Encrypting, moving and hiding it are all probably your best options. There are plenty of tutorials on VB.Net encryption, and as far as I can remember a good few on D.I.C. :)
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1