Solved

Need help with batch file to make partition disappear.

Posted on 2004-04-23
8
1,052 Views
Last Modified: 2008-03-10
I'm running XP Pro, I would like to know if there is a way to make your operating system hide the data partition (D:\ ) so that if a virus was to infect the machine it would not infect the data partition because it would be invisible to the system.  I set up my OS in the c:/ drive and loaded all the apps onto it also.  I created a second partition as the D drive.  There is 93Gb of space on D:  and 20GB of space on C. if this is important.

I need to be able to just hit an Icon or just a button and my D: partition will disappear but actually still be there. It is important that there is a icon or shortcut that would allow me to do this anytime without causing damage to the OS or hard drive.  

I was told that there is a way to tweak the registry in XP Pro to allow this to happen. Is this true and how would I go about doing this.   I would appreciate any help provided.

I was told that there is a way to create a batch file that will create an icon or button that can make the drive appear to be invisible.  I've never created a batch file, is this something that can be done?



Thanks

Jungliss23
0
Comment
Question by:jungliss23
8 Comments
 
LVL 4

Accepted Solution

by:
zombieooo earned 125 total points
ID: 10902394
Try Magic Folders or Encrypted Magic Folders.
http://www.pc-magic.com/des.htm

Joel
0
 
LVL 6

Expert Comment

by:mrdtn
ID: 10903040
0
 
LVL 4

Assisted Solution

by:venishjoe
venishjoe earned 125 total points
ID: 10936774
Hai,

 You can change the registry to hide the drives.

This setting allows you to control which drives are visible in My Computer and Explorer. It is possible to hide all drives or just selected ones.

The "NoDrives" value uses a 32-bit word to define local and network drive visibility for each logical drive in the computer. The lower 26 bits of the 32-bit word correspond to drive letters A through Z. Drives are visible when set to 0 and hidden when set to 1.

If your not happy working in Hex, add these decimal numbers to hide the drive(s):

A: 1, B: 2, C: 4, D: 8, E: 16, F: 32, G: 64, H: 128, I: 256, J: 512, K: 1024, L: 2048, M: 4096, N: 8192, O: 16384, P: 32768, Q: 65536, R: 131072, S: 262144, T: 524288, U: 1048576, V: 2097152, W: 4194304, X: 8388608, Y: 16777216, Z: 33554432, ALL: 67108863

For example to hide drive A and drive D, you would add 1 (A) + 8 (D) which means the value should be set to "9".

To disable all the drives set the value to "67108863".

Restart Windows for the change to take effect.

Note: These drives will still appear in File Manager, to remove File Manager, delete or rename winfile.exe.

Registry Settings
User Key: [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\
Explorer]
System Key: [HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\
Explorer]
Value Name: NoDrives
Data Type: REG_DWORD (DWORD Value)

This restriction prevents users from using My Computer or Explorer to access the content of selected drives. Also, they cannot use Run, Map Network Drive, or the Dir command to view the directories on these drives

Open your registry and find or create the key below.
The "NoViewOnDrive" value uses a 32-bit bitmask to define local and network drive access for each logical drive in the computer. The lower 26 bits of the 32-bit word correspond to drive letters A through Z. Drives are visible when set to 0 and hidden when set to 1.

If your not happy working in Hex, add these decimal numbers to hide the drive(s):

A: 1, B: 2, C: 4, D: 8, E: 16, F: 32, G: 64, H: 128, I: 256, J: 512, K: 1024, L: 2048, M: 4096, N: 8192, O: 16384, P: 32768, Q: 65536, R: 131072, S: 262144, T: 524288, U: 1048576, V: 2097152, W: 4194304, X: 8388608, Y: 16777216, Z: 33554432, ALL: 67108863

For example to hide drive A and drive D, you would add 1 (A) + 8 (D) which means the value should be set to "9".

To disable all the drives set the value to "67108863".

Restart Windows for the change to take effect.

Registry Settings
User Key: [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\
Explorer]
System Key: [HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\
Explorer]
Value Name: NoViewOnDrive
Data Type: REG_DWORD (DWORD Value)
Value Data: 32-bit bitmask
 

You can put it in a .reg file so that in can be executed by clicking it (ie.,you can hinde/unhide by a single click)
Also I added the restrictions for the drive in the secong tweak

 
The method to create .reg file is given here

http://is-it-true.org/nt/registry/regfiles.shtml


Also for creating .reg files refer
http://www.geekgirls.com/windows_registry03.htm

For creating batch files from .reg files then refer
www.robvanderwoude.com/regedit.html 

Hope this helps

Regards
Venish
 
0
Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 

Assisted Solution

by:jam-four
jam-four earned 125 total points
ID: 11064612
you can unmount the drive, completly cutting off all access to it by doing the following in the command prompt (make a batch file out of it if you want):

MOUNTVOL D: /D

im not sure if this will work, i haven't tried it personally but have heard it does,
type MOUNTVOL /? for more info.
WARNING! as far as i understand you would have to know the volume's PATH name that is listed when you type MOUNTVOL /? to remount the drive so you can use it again.  however i may just understand it wrong and you just need to type the drive name.  just in case, backup whatevers on the drive and test it on it.

hope this helps.
0
 
LVL 5

Assisted Solution

by:shaic
shaic earned 125 total points
ID: 11142301
Try Encryption for the Masses (E4M)

E4M is an on-the-fly disk encryption product. What this means is create a volume on your hard disk, CDROM, floppy or other media which is essentially just a normal file. The file however is in fact a file system itself. It contains all the structures needed by your operating system to recognise the file as a file system of a particular type such as FAT or NTFS. This is called a "file hosted volume". Or you could choose a blank or unwanted partition on a local hard disk or floppy disks and format it using E4M. You can then mount this new encrypted volume, and use it like you would any other drive. This is called a "Raw partition volume". To your operating system, these new volumes will work exactly like your C drive, or any other drive on your system. Free (open source).

http://www.woundedmoon.org/win32/e4m202a.html
http://www.woundedmoon.org/win32/e4m202a.zip
0
 
LVL 4

Expert Comment

by:MaartenG
ID: 11382427
Hi jungliss23,

still looking for an answer?
0

Featured Post

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The following is a collection of cases for strange behaviour when using advanced techniques in DOS batch files. You should have some basic experience in batch "programming", as I'm assuming some knowledge and not further explain the basics. For some…
YESTERDAY YESTERDAY.BAT is inspired by a previous article I wrote entitled: TOMORROW.BAT (http://www.experts-exchange.com/OS/Microsoft_Operating_Systems/MS_DOS/A_4196-Advanced-Batch-File-Programming-TOMORROW-BAT.html). The crux of this batch f…
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.

685 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question