Solved

Need help with batch file to make partition disappear.

Posted on 2004-04-23
8
1,050 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
Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

 

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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

One of my most closely kept secrets is revealed in this discussion How to output text on the same line This question was recently posted in EE by Simon336697 (http://www.experts-exchange.com/Programming/Languages/Scripting/Shell/Batch/Q_2459…
TOMORROW TOMORROW.BAT is inspired by a question I get asked over and over again; that is, "How can I use batch file commands to obtain tomorrow's date?" The crux of this batch file revolves around the XCOPY command - a technique I discovered w…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

856 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