🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

6 total messages Started by Steve Andres Wed, 06 Dec 1995 20:40
Command-line operable FDISK substitute
#463
Author: Steve Andres
Date: Wed, 06 Dec 1995 20:40
10 lines
1045 bytes
Does anyone have a command line FDISK substitue?  I'm trying to write a 
workstation rebuild utility for a computer lab and it needs to run a batch file 
that will delete and recreate the partition, format it, and unzip a file.

The formatting and unzipping I can take care of, but since FDISK requires user 
input, that part can't be automated.  Thus, the user (usually ignorant to the 
intricacies of FDISK) must delte and recreate the partition.

Any information would be appreciated either posted here or sent to 
steven@ucla.edu.  Thanks.
Re: Command-line operable FDISK substitute
#464
Author: Don Jones
Date: Wed, 06 Dec 1995 23:04
20 lines
1410 bytes
In article <4a4v4j$1n8p@tako.info.ucla.edu>,
Steve Andres <steven@ucla.edu> wrote:
>Does anyone have a command line FDISK substitue?  I'm trying to write a 
>workstation rebuild utility for a computer lab and it needs to run a batch file 
>that will delete and recreate the partition, format it, and unzip a file.
Just a thought. Create a file with all of the necessary keystrokes,
for example, to view information under DOS 5.0 fdisk you need to hit
4 and then the enter key.  When you are done viewing the information,
you need to hit ESC twice.  Create a file KEYS and put '4<CR><ESC><ESC>'
without the quotes into it.  Then redirect the file to FDISK like:

fdisk <keys

good luck,

don
--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Don and Sue Jones       |   If debugging is the process of removing errors,
djones@max.tiac.net     |   Then programming is the process of putting them in.
Re: Command-line operable FDISK substitute
#466
Author: Dan Pop
Date: Thu, 07 Dec 1995 10:00
27 lines
1649 bytes
In <4a57ik$ho5@sundog.tiac.net> djones@tiac.net (Don Jones) writes:

>In article <4a4v4j$1n8p@tako.info.ucla.edu>,
>Steve Andres <steven@ucla.edu> wrote:
>>Does anyone have a command line FDISK substitue?  I'm trying to write a 
>>workstation rebuild utility for a computer lab and it needs to run a batch file 
>>that will delete and recreate the partition, format it, and unzip a file.

>Just a thought. Create a file with all of the necessary keystrokes,
>for example, to view information under DOS 5.0 fdisk you need to hit
>4 and then the enter key.  When you are done viewing the information,
>you need to hit ESC twice.  Create a file KEYS and put '4<CR><ESC><ESC>'
>without the quotes into it.  Then redirect the file to FDISK like:
>
>fdisk <keys
>
>good luck,

He'll need a lot of good luck because FDISK (the DOS flavour) doesn't
look like an application getting its input from stdin :-)

Dan
--
Dan Pop
CERN, CN Division
Email: danpop@mail.cern.ch 
Mail:  CERN - PPE, Bat. 31 R-004, CH-1211 Geneve 23, Switzerland
Re: Command-line operable FDISK substitute
#467
Author: Michael Furman
Date: Thu, 07 Dec 1995 23:02
33 lines
1807 bytes
In article <4a4v4j$1n8p@tako.info.ucla.edu>, steven@ucla.edu says...
>
>Does anyone have a command line FDISK substitue?  I'm trying to write a 
>workstation rebuild utility for a computer lab and it needs to run a batch 
file 
>that will delete and recreate the partition, format it, and unzip a file.
>
>The formatting and unzipping I can take care of, but since FDISK requires 
user 
>input, that part can't be automated.  Thus, the user (usually ignorant to 
the 
>intricacies of FDISK) must delte and recreate the partition.
>
   This is totally off-topic for comp.lang.C++.
   But .... Couple of years ago 
I had exactly the same problem. My solution was: throw away FDISK, but make 
a program which write phisical boot sector (using BIOS level), replace
autoexec.bat and reboot. After reboot - rut format e.t.c.



>Any information would be appreciated either posted here or sent to 
>steven@ucla.edu.  Thanks.
>
>

-- 
---------------------------------------------------------------
Michael Furman,                       (603)893-1109
Geophysical Survey Systems, Inc.  fax:(603)889-3984
13 Klein Drive - P.O. Box 97          engr@gssi.mv.com 
North Salem, NH 03073-0097            71543.1334@compuserve.com
---------------------------------------------------------------
Re: Command-line operable FDISK substitute
#465
Author: John F. Ayo
Date: Fri, 08 Dec 1995 01:31
15 lines
1312 bytes
steven@ucla.edu (Steve Andres) wrote:
>Does anyone have a command line FDISK substitue?  I'm trying to write a 
>workstation rebuild utility for a computer lab and it needs to run a batch file 
>that will delete and recreate the partition, format it, and unzip a file.
>
>The formatting and unzipping I can take care of, but since FDISK requires user 
>input, that part can't be automated.  Thus, the user (usually ignorant to the 
>intricacies of FDISK) must delte and recreate the partition.

Keep in mind, also, that batch file lines are read as they are executed, so make 
sure your batch file isn't on the partition being deleted. :)

-- 
John Ayo
Engineering LAN Admin., Laitram Corp.
Re: Command-line operable FDISK substitute
#468
Author: Andrew Castles
Date: Thu, 14 Dec 1995 17:52
36 lines
1706 bytes
steven@ucla.edu (Steve Andres) wrote:

>Does anyone have a command line FDISK substitue?  I'm trying to write a 
>workstation rebuild utility for a computer lab and it needs to run a batch file 
>that will delete and recreate the partition, format it, and unzip a file.

>The formatting and unzipping I can take care of, but since FDISK requires user 
>input, that part can't be automated.  Thus, the user (usually ignorant to the 
>intricacies of FDISK) must delte and recreate the partition.

If fdisk will be taking the same commands each time you run it then
you could probably get round your problem like this:

1.  Create a text file (commands.txt) and put into it all the commands
that you would have to type into fdisk by hand exactly as you would
type them, for example

3
1
etc

Don't forget to include all the return characters and escape
characters that you need.

2.  Run call fdisk from your command prompt using:

	fdisk < commands.txt

to run fdisk but take input to the program from the file called
commands.txt

That should do it for you.

Hope I was of some help.

Andrew Castles
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads