12 Replies - 783 Views - Last Post: 17 April 2012 - 11:44 PM Rate Topic: -----

#1 shihabudheenpk  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 10
  • Joined: 14-April 12

Locking Or Unlocking A Drive

Posted 14 April 2012 - 11:36 PM

How Can i Make A Drive Not Aceessible From Windows Explorer using Vb6 Code.I want to use make changes in registry to lock the drive.I Have Tried A Simple Code listed down:
Private Sub Command1_Click()
 Dim a
 On Error Resume Next
a = Shell("REG ADD HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer /v NoViewOnDrive /t REG_DWORD /d 8 /F")
 End Sub
'Drive = Code
 'a = 1
 'B = 2
 'C = 4
 'D = 8
 'E = 16
 'F = 32
 'G = 64
 'H = 128



Is This A Good Question/Topic? 0
  • +

Replies To: Locking Or Unlocking A Drive

#2 DimitriV  Icon User is offline

  • Don't try to save yourself… the circle is complete
  • member icon

Reputation: 544
  • View blog
  • Posts: 2,632
  • Joined: 24-July 11

Re: Locking Or Unlocking A Drive

Posted 14 April 2012 - 11:38 PM

Mmm? And, what happened? Was there an error or something?
Was This Post Helpful? 0
  • +
  • -

#3 shihabudheenpk  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 10
  • Joined: 14-April 12

Re: Locking Or Unlocking A Drive

Posted 14 April 2012 - 11:57 PM

[quote name='Shihabudheenpk' date='14 April 2012 - 11:38 PM' timestamp='1334471926' post='1600348']
It gives no error but no changes happened in windows explorer

It gives no errors but there is no changes happened in the windows explorer
Was This Post Helpful? 0
  • +
  • -

#4 shihabudheenpk  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 10
  • Joined: 14-April 12

Re: Locking Or Unlocking A Drive

Posted 15 April 2012 - 12:03 AM

Reply Me Fast It Is so urgent
Was This Post Helpful? 0
  • +
  • -

#5 maj3091  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 271
  • View blog
  • Posts: 1,632
  • Joined: 26-March 09

Re: Locking Or Unlocking A Drive

Posted 15 April 2012 - 12:58 AM

Did you try adding the registry entry manually to prove that the actual hack works?

Also, what is the purpose of this?

Please don't go on about how urgent it is, you'll end up getting less assistance as it makes you come across as demanding!

This post has been edited by maj3091: 15 April 2012 - 12:59 AM

Was This Post Helpful? 0
  • +
  • -

#6 shihabudheenpk  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 10
  • Joined: 14-April 12

Re: Locking Or Unlocking A Drive

Posted 15 April 2012 - 01:32 AM

View Postmaj3091, on 15 April 2012 - 12:58 AM, said:

Did you try adding the registry entry manually to prove that the actual hack works?

Also, what is the purpose of this?

Please don't go on about how urgent it is, you'll end up getting less assistance as it makes you come across as demanding!

Was This Post Helpful? 0
  • +
  • -

#7 shihabudheenpk  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 10
  • Joined: 14-April 12

Re: Locking Or Unlocking A Drive

Posted 15 April 2012 - 01:50 AM

how can i add it to the registry manually

Hey Friend.
Please Check this code in your system,If it works please tell me the corrected code.
Because iam a newbie to vb.
Or Give Me a that you already knows.
Was This Post Helpful? 0
  • +
  • -

#8 maj3091  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 271
  • View blog
  • Posts: 1,632
  • Joined: 26-March 09

Re: Locking Or Unlocking A Drive

Posted 15 April 2012 - 01:56 AM

View Postshihabudheenpk, on 15 April 2012 - 08:50 AM, said:

how can i add it to the registry manually

Hey Friend.
Please Check this code in your system,If it works please tell me the corrected code.
Because iam a newbie to vb.
Or Give Me a that you already knows.


Hmmm...No, I won't check it in my system. I'm not a guinea pig for your code.

If you don't know how to manually edit the registry, then that should be your starting point, so google on how to do it.

You're trying to add a registry entry using code, if you don't know how to navigate the registry, how can you tell if the key was added??

So you should do the following:

1. Learn how to navigate the registry. It's not difficult, but can be "dangerous" if you don't take care.
2. Add the key manually to confirm that it works. If it does, move to step 3. If it doesn't, then no point moving to step 3.
3. Remove the key, then try it again using your code. Confirm the key has been added.

Unless you do it in that order, you will never know where the problem actually lies!

Your code may be functioning correctly, but if the registry entry doesn't work, then it will never work.

This post has been edited by maj3091: 15 April 2012 - 01:57 AM

Was This Post Helpful? 0
  • +
  • -

#9 shihabudheenpk  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 10
  • Joined: 14-April 12

Re: Locking Or Unlocking A Drive

Posted 15 April 2012 - 03:02 AM

Hey I Have Simply Said That I Don't Know About Registry.I Have Added the code to the registry successfully.But i want to know about how can i make a drive inaccessible.
Was This Post Helpful? 0
  • +
  • -

#10 maj3091  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 271
  • View blog
  • Posts: 1,632
  • Joined: 26-March 09

Re: Locking Or Unlocking A Drive

Posted 15 April 2012 - 03:07 AM

You said you didn't know how to add a key manually?

If you've added it to the registry manually and it hasn't worked, then no amount of changing your program is going to fix that, until you find a registry hack that works.

I asked you originally, what is the purpose of doing this, as there are maybe other ways to do it.
Was This Post Helpful? 0
  • +
  • -

#11 BobRodes  Icon User is offline

  • Your Friendly Local Curmudgeon
  • member icon

Reputation: 545
  • View blog
  • Posts: 2,904
  • Joined: 19-May 09

Re: Locking Or Unlocking A Drive

Posted 17 April 2012 - 06:48 AM

View Postshihabudheenpk, on 15 April 2012 - 11:02 AM, said:

Hey I Have Simply Said That I Don't Know About Registry.I Have Added the code to the registry successfully.But i want to know about how can i make a drive inaccessible.
If you don't know about the registry, then how do you know that you have added the code to it successfully? Also, what kind of drive are you talking about? A hard drive or a CD-ROM drive? And do you mean a drive or a folder, really?

And finally, you're beginning to sound pushy. Stop sounding pushy, or you'll find yourself pushing on air.
Was This Post Helpful? 0
  • +
  • -

#12 shihabudheenpk  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 10
  • Joined: 14-April 12

Re: Locking Or Unlocking A Drive

Posted 17 April 2012 - 09:06 PM

Iam saying about the ordinary drives like c or d etc.
Was This Post Helpful? 0
  • +
  • -

#13 maj3091  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 271
  • View blog
  • Posts: 1,632
  • Joined: 26-March 09

Re: Locking Or Unlocking A Drive

Posted 17 April 2012 - 11:44 PM

For the last time I post on this, because you refuse to answer my questions.

What is the purpose of it as there may be other ways to do it.

Please explain the scenario.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1