Computing.Net > Forums > Disk Operating System > Show & Hide a partition w/ a Batch file?

Show & Hide a partition w/ a Batch file?

Reply to Message Icon

Original Message
Name: Darkshadeau
Date: June 29, 2000 at 11:11:26 Pacific
Subject: Show & Hide a partition w/ a Batch file?
Comment:

I am trying to create a batch file that will allow me to unhide a partition, store a file on that partition, and then hide the partition again. I want to hide the partition so that it won't be assigned a drive letter in DOS/Windows. I cannot store the file on the main partition because it will be imaged.

Any suggestions?


Report Offensive Message For Removal


Response Number 1
Name: Preston
Date: June 29, 2000 at 14:24:26 Pacific
Reply: (edit)

My view would be that you're asking the impossible. Batch files execute DOS commands or DOS programs one at a time. One command or program has to finish before the next command/program can begin.

Bearing that in mind, you'd need a DOS program to unhide a partition (I've never heard of one), then you'd use the DOS command to copy a file onto the partition's drive letter, then a DOS program to remove the drive letter and hide the partition (never heard of program that doest that either).

I think you are asking for the impossible. However, perhaps some other knowledgeable poster may know of a DOS program that can hide/unhide partitions.

Of course, you could do this using a container file/compressed file.


Report Offensive Follow Up For Removal

Response Number 2
Name: DoOMsdAY
Date: June 29, 2000 at 15:04:04 Pacific
Reply: (edit)

This page has a partition manager program that will allow you to hide or unhide partitions. He also has the source code for the application that does this. Perhaps you'll be able to glean something from that, however I don't see this as a) being an easy thing to do, b) it may not even be possible cause you need to reload the MBR when partition information changes...so far as I know. Either way, the link is:

http://www.users.intercom.com/~ranish/part/


Report Offensive Follow Up For Removal

Response Number 3
Name: mr o
Date: June 30, 2000 at 03:08:12 Pacific
Reply: (edit)

All you need to do is set the partition as active, i think its just one byte that needs to be set, i had a program once that would do it for me. I know this isnt much help but if you can find the offset for this byte couldnt you just use a debug script to perform it in a batch file???
Id send you the file, but my old hd with all my great dos progs is in storage, plus i cant really remember the filname.


Report Offensive Follow Up For Removal

Response Number 4
Name: DoOMsdAY
Date: June 30, 2000 at 04:57:31 Pacific
Reply: (edit)

mr o: One of the things that program I pointed him to does is to set a partition as active or not active, so he should be able to find the location of that byte in there as well. You should check that program out. It's a really cool partition manager / multi-OS loader and it's free!


Report Offensive Follow Up For Removal

Response Number 5
Name: Darkshadeau
Date: June 30, 2000 at 10:05:35 Pacific
Reply: (edit)

Thanks for the input. I may have misrepresented my wishes, however. I do not need to hide/unhide during the same boot. My wish is to:

1. Unhide the partition. If I need to reboot after this, I think I can use the same autoexec that unhid the partition to check to see how many drive letters (unhidden partition) there were. If there were two (instead of just 'C:'), I could then move the file and continue with my image install.

2. After the image is installed, I could have a batchfile in the "runonce" portion of the Windows registry that would move the file back, hide the partition, and reboot.

The reason that I am doing this is that I am trying to automate the backing up of Netscape bookmarks so that they aren't reset every time I re-image the hard drive. I want this to occur without ANY user intervention. I could have them save to the floppy (that's easy), but then the user would have to reinsert the floppy after the image was complete and rebooted (user intervention). I could have them save to the network, but that would require network authentication (which I won't be using for the image).


----------EUREKA! I HAVE IT!---------

I could just have the batch file look for the 'bookmark.htm' on the floppy. If it wasn't there, it would move it from the 'C:' drive to the floppy and continue with the image. After the image is complete, the computer will automatically restart. The autoexec would then FIND the 'bookmark.htm' on the floppy MOVE it back to the default location on the 'C:' drive. It would then display a message that stated the image restore is complete and tell the user to eject the disk and restart the computer (instead of re-imaging again).

Geez, I was making that much more difficult that it had to be.

Thanks again for everyone's input.

-Darkshadeau


Report Offensive Follow Up For Removal


Response Number 6
Name: DoOMsdAY
Date: June 30, 2000 at 11:24:37 Pacific
Reply: (edit)

Usually the easiest solutions work the best. Glad you figured it out. :)


Report Offensive Follow Up For Removal

Response Number 7
Name: W0rm
Date: June 30, 2000 at 14:27:12 Pacific
Reply: (edit)

hrm, I'm tired :) can't read too much. so I don't know if you had your question answered. However, I do know that "AEFDISK" can hide/show partitions, and it can be done on command line. I havent put it up on my page yet though :( -> http://w0rm.8m.com -> but it is on the "techw0rm" bootdisk, you'd have to install that and then pull it off the disk.
- W0rm


Report Offensive Follow Up For Removal

Response Number 8
Name: Sherlock
Date: August 4, 2000 at 06:41:57 Pacific
Reply: (edit)

Hello,

Please try the following links :

http://www.powerquest.com/support/SM/sm8002.html
http://www.v-com.com/support/techfaqs_all/hide_partition.html

Regards,
Sherlock.

holmes@qsupport.com


Report Offensive Follow Up For Removal






Use following form to reply to current message:

   Name: From My Computing.Net Settings
 E-Mail: From My Computing.Net Settings

Subject: Show & Hide a partition w/ a Batch file?

Comments:

 


  Homepage URL (*): 
Homepage Title (*): 
         Image URL: 
 
Data Recovery Software




Have you ever used OpenOffice?

Yes, as my main suite.
Yes, occationally.
Yes, but only once.
No, never.


View Results

Poll Finishes In 6 Days.
Discuss in The Lounge