Solved

Need help with batch file to make partition disappear.

Posted on 2004-04-23
8
1,047 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
Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

 

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

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Correct way to use if / else command 3 57
Question to Zip 8 72
find and replace 5 44
Robocopy command line 6 34
Being a system administrator some time we require to do things remotely, one of them is installing software. Here I am going to tell you how to install software through wmic (Windows management instrument console). I am not at all saying that this i…
Introduction: Recently, I got a requirement to zip all files individually with batch file script in Windows OS. I don't know much about scripting, but I searched Google and found a lot of examples and websites to complete my task. Finally, I was ab…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…

746 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now