|
-
Mako Shark
need really good DOS batch file helper
basically i've got to make a batch file to run some menu options, sort of a utility diskette if an OS fails. i need to find a good batch file guide and having no luck. here's what i've got so far, also, in case you can't tell, I'm not good with programming. and im working it bit by bit. the little variable n you see is a variable for my name, but i couldn't figure out how to do it.
@echo off
cls
:start
echo Today's date us:
date /t
echo
echo ********************************
echo %n
echo Utility Menu
echo ********************************
echo 1. Launch Microsoft Diagnostics
echo 2. Launch DOS editor
echo 3. Show the hard drive partitions that already exist
echo 4. Repartition hard drive
echo 5. Format a partition
echo 6. Transfer system files to the hard drive
echo 7. Display c:\config.sys
echo 8. Display c:\autoexec.bat
echo E. Exit
echo ********************************
choice /a:12345678E choose a menu option
if errorlevel E goto exit
if errorlevel 8 goto autoexec
if errorlevel 7 goto config
if errorlevel 6 goto system
if errorlevel 5 goto format
if errorlevel 4 goto fdisk
if errorlevel 3 goto part
if errorlevel 2 goto DOS
if errorlevel 1 goto MSD
:autoexec
type autoexec.bat
pause > null
press any key to return to the main menu...
goto start
:config
type config.sys
pause > null
press any key to return to the main menu...
goto start
:system
a:>sys c:
pause > null
press any key to return to the main menu...
goto start
:format
:fdisk
art
:dos
edit
:msd
msd
:exit
cls
exit
A64 X2 4200+ (65W) - 2GB OCZ SOE 667@800 - MSI K9N SLI Platinum - BFG 9600GT OC - ATI TV Wonder - Seagate 320GB SATAII - Seagate 200GB SATA - External 750GB WD - Black LG 16x DVD-/+RW - CoolerMaster Mystique - Logitech MX1000 and Elite keyboard - Logitech X-530 5.1 Speakers - Vista SP1
-
| AMD64 3000+ (skt 754)| 256MB Sapphire Radeon 9600XT | MSI K8N Neo Platinum | 450W Antec SP-450PGB PSU |Corsair 1024MB CMX1024-3200C2PT + TwinMOS PC3200 512MB CL2.5 | 80GB WD SE HDD (8MB Cache) | 180GB IBM/Hitachi 180GXP HDD | NEC 2500A DVR+-RW | Creative FPS1000 Speakers |
-
Are you that worried about a batch file displaying your name if your system crashes? From what I remember, batch variables are in the form %Var%. %Something is only used for parameter variables, such as %1, %2, %3. What's wrong with 'Echo Hello Sam' ?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|