Microsoft
Software
Hardware
Network
Question : Batch script problems
Hello,
I'm trying to write a batch script to determines if grub4dos has to start one operating system or another. First of all I want that it tries to boot Windows and if a file (bootmgr) it is not in the right place,it should boots Knoppix. It should be something like this :
start.bat
@echo off
cls
c:
cd \menuwind
grub
IF ERRORLEVEL 1 goto start_linux
:start_linux
cls
c:
cd \
grub
This is the menu.lst located into the C:\menuwind folder
title Windows
root (hd0,1)
chainloader (hd0,1)/winzozz/bootmgr
and this is the menu.lst located to the root of the disk :
title Knoppix
kernel /KNOPPIX/BOOT/ISOLINUX/LIN
UX. ramdisk_size=100000 2 toram lang=it vt.default_utf8=0 apm=power-off vga=791 nomce quiet loglevel=0 tz=localtime
initrd /KNOPPIX/BOOT/ISOLINUX/MIN
IRT.GZ
for "IF ERRORLEVEL 1" I mean that when the file (bootmgr) located at : (hd0,1)/winzozz/bootmgr is not there,the script should jump to the :start_linux label,but it does not work !
Answer : Batch script problems
well whats the dif we just need to check "IF EXIST" or is it giving false positives and negatives?
Random Solutions
HELP! Windows SBS 2008 server keeps hanging URGENT!
Filling a TextBox on a Form with Data from a Field from an SQL Database Table in Visual Studio 2008
GridView control scroll bars are not visible on page reload
How can I convert a custom control that calls User32 and Shell32 to work on Mono?
how can i find all ILO boards on a network
Excel Date Time format conversion yyyy-mmm-dd hh:mm:ss to mm/dd/yyyy hh:mm:ss
I can send e-mail ok but cannot get to Internet via browser
SQL Scripts in a .bat file?
Setting up my first database driven web site
PHP Array: Only the first item in array is returned