Hallo mede tweakers,
Ik zit met een onverklaarbaar probleem.
Mijn kennis van batch files maken is niet erg hoog. Maar dit is helemaal een raadsel.
Vraagje tussendoor: ondersteund het DOS voor win98 choice command ook meer dan 9 keuze opties? (errorlevels). Ik kon daar niks over vinden op google.
Probleem:
Onderstaande batch file om ghost te automatiseren deed het eerst prima en van de één op de andere dag accepteerde hij alleen de eerste optie
Dus als ik optie 1 kies dan gaat hij ook echt exit. Maar als ik optie 2 toets dan voert hij gewoon optie 1 (dus exit) uit terwijl hij bij toets 2 toch echt, zoals te lezen is, naar de xridvd moet gaan.
Hiervoor heb ik ook menu's staan die wel gewoon werken
(zie ******)
Wat heb ik geprobeerd en niet werkte:
- GOT search
- Google search
- alle cijfers door letters vervangen zodat ik tot "S" kon gaan.
- ingekort naar 2 opties (zie errorlevel)
- choice:/c12 choose a command from 1 till 8 en choice:/c<a t/ms> choose a command from 1 till 8
- CHOICE/C:12
- volgorde errorlevels omgedraaid. Begon met s en teruglopend, daarna a,b,c,d, etc. van gemaakt.
- alle :<code> weggehaald en alleen de :xridvd laten staan.
- "CD\" na :xridvd gezet zodat hij eerst naar root ging en dan mouse en ghost uitvoerde.
- "CD.." na :xridvd gezet zodat hij eerst naar root ging en dan mouse en ghost uitvoerde.
Ik boot vanaf een USB stick in windows 95 dos. Dit werkt prima.
Ook werkt onderstaande batch menu voor laptop prima, wat hetzelfde lijkt als de problematische:
******
@echo off
:start
cls
echo ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»
echo º ***WINDOWS MENU*** º
echo ÌÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ͹
echo º 1. XP create º
echo º 2. XP restore º
echo º 3. XP create DVD º
echo º 4. XP restore from DVD º
echo º-------------------------------º
echo º 5. SUB MENU LAPTOP º
echo º 6. Exit to DOS º
echo º 7. Reboot º
echo ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ
choice:/c1234567 Choose a command from 1 till 7
if errorlevel 8 goto start
if errorlevel 7 goto reboot
if errorlevel 6 goto exit
if errorlevel 5 goto sml
if errorlevel 4 goto ridvd
if errorlevel 3 goto cidvd
if errorlevel 2 goto ri
if errorlevel 1 goto ci
:ci
SET TZ=GHO-01:00
MOUSE.COM
echo Busy to make winnie image...
ghost.exe -clone,mode=pdump,src=2:4,dst=2.5:\OSIMAGES\WINNIE\LAPTOPCOMPLEET.GHO -CNS -Z9 -VDW -NTD -SURE
GOTO start
:ri
SET TZ=GHO-01:00
MOUSE.COM
echo Busy to restore winnie image...
ghost.exe -clone,mode=pload,src=2.5:\OSIMAGES\WINNIE\LAPTOPCOMPLEET.GHO:1,dst=2:4 -SURE -RB
GOTO start
:cidvd
SET TZ=GHO-01:00
MOUSE.COM
echo Busy to make winnie DVD image...
ghost.exe -clone,mode=pdump,src=2:4,dst=@CD-R1:\LAPTOPCOMPLEET.gho -CNS -Z9 -VDW -NTD -SURE
GOTO start
:ridvd
SET TZ=GHO-01:00
MOUSE.COM
echo Busy to restore winnie DVD image...
ghost.exe -clone,mode=pload,src=@CD-R1:\LAPTOPCOMPLEET.GHO:1,dst=2:4 -SURE -RB
GOTO start
:sml
LAPTOP.BAT
:reboot
af4.exe
Ik weet het niet meer. Ik zie ook geen vreemde code erin.
De batchfile moet gewoon mijn errorlevels onthouden. Dus bij 2 indrukken moet hij naar :xridvd gaan en onderstaande code uitvoeren, etc. :
SET TZ=GHO-01:00
MOUSE.COM
echo Busy to restore W7 DVD image...
ghost.exe -clone,mode=pload,src=@CD-R1:\w7COMPLEET.GHO:1,dst=3:3
GOTO start
Problematische batchfile:
@echo off
rem plaats -SURE en -Z9 bij image create. Bij restore ook -RB
:start
cls
echo ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»
echo º ***WINDOWS MENU*** º
echo ÌÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ͹
echo º A. XP create º I. 2k8server create º
echo º B. XP Restore º J. 2k8server restore º
echo º C. XP create DVD º K. 2k8server create DVD º
echo º D. XP restore from DVD º L. 2k8server restore from DVD º
echo º---------------------------º--------------------------------º
echo º E. win7 create º M. vista create º
echo º F. win7 restore º N. vista restore º
echo º G. win7 create DVD º O. vista create DVD º
echo º H. win7 restore from DVD º P. vista restore from DVD º
echo º------------------------------------------------------------º
echo º Q. SUB MENU ALCAPINO º
echo º------------------------------------------------------------º
echo º R. Exit to DOS º
echo º S. Reboot º
echo ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ
CHOICE/C12
if errorlevel 1 goto exit
if errorlevel 2 goto xridvd
:xci
cls
SET TZ=GHO-01:00
MOUSE.COM
echo Busy to make XP image...
ghost.exe -clone,mode=pdump,src=3:2,dst=3.6:\IMAGES\GHOST\ALCAPINO\XPCOMPLEET.GHO -CNS -VDW -NTD
GOTO start
:xri
SET TZ=GHO-01:00
MOUSE.COM
echo Busy to restore XP image...
ghost.exe -clone,mode=pload,src=3.6:\IMAGES\GHOST\ALCAPINO\XPCOMPLEET.GHO:1,dst=3:2
GOTO start
:xcidvd
SET TZ=GHO-01:00
MOUSE.COM
echo Busy to make XP DVD image...
ghost.exe -clone,mode=pdump,src=3:2,dst=@CD-R1\XPCOMPLEET.GHO -Z9 -auto
GOTO start
:xridvd
SET TZ=GHO-01:00
MOUSE.COM
echo Busy to restore XP DVD image...
ghost.exe -clone,mode=pload,src=@CD-R1:\XPCOMPLEET.GHO:1,dst=3:2
GOTO start
:7ci
SET TZ=GHO-01:00
MOUSE.COM
echo Busy to make W7 image...
ghost.exe -clone,mode=pdump,src=3:3,dst=3.6:\IMAGES\GHOST\WIN7\w7COMPLEET.GHO -CNS -Z9 -VDW -NTD
GOTO start
:7ri
SET TZ=GHO-01:00
MOUSE.COM
echo Busy to restore W7 image...
ghost.exe -clone,mode=pload,src=3.6:\IMAGES\GHOST\WIN7\w7COMPLEET.GHO:1,dst=3:3
GOTO start
:7cidvd
SET TZ=GHO-01:00
MOUSE.COM
echo Busy to make W7 DVD image...
ghost.exe -clone,mode=pdump,src=3:3,dst=@CD-R1\w7COMPLEET.GHO -Z9 -auto
GOTO start
:xridvd
SET TZ=GHO-01:00
MOUSE.COM
echo Busy to restore W7 DVD image...
ghost.exe -clone,mode=pload,src=@CD-R1:\w7COMPLEET.GHO:1,dst=3:3
GOTO start
:2k8ci
SET TZ=GHO-01:00
MOUSE.COM
echo Busy to make SERVER 2K8 image...
ghost.exe -clone,mode=pdump,src=3:4,dst=3.6:\IMAGES\GHOST\S2K8\S2K8COMPLEET.GHO -CNS -Z9 -VDW -NTD
GOTO start
:2k8ri
SET TZ=GHO-01:00
MOUSE.COM
echo Busy to restore SERVER 2K8 image...
ghost.exe -clone,mode=pload,src=3.6:\IMAGES\GHOST\S2K8\S2K8COMPLEET.GHO:1,dst=3:4
GOTO start
:2k8cidvd
SET TZ=GHO-01:00
MOUSE.COM
echo Busy to make SERVER 2K8 DVD image...
ghost.exe -clone,mode=pdump,src=3:4,dst=@CD-R1\S2K8COMPLEET.GHO -Z9 -auto
GOTO start
:2k8ridvd
SET TZ=GHO-01:00
MOUSE.COM
echo Busy to restore SERVER 2K8 DVD image...
ghost.exe -clone,mode=pload,src=@CD-R1:\S2K8COMPLEET.GHO:1,dst=3:4
:vci
SET TZ=GHO-01:00
MOUSE.COM
echo Busy to make VISTA image...
ghost.exe -clone,mode=pdump,src=3:5,dst=3.6:\IMAGES\GHOST\VISTA\w7COMPLEET.GHO -CNS -Z9 -VDW -NTD
GOTO start
:vri
SET TZ=GHO-01:00
MOUSE.COM
echo Busy to restore VISTA image...
ghost.exe -clone,mode=pload,src=3.6:\IMAGES\GHOST\VISTA\w7COMPLEET.GHO:1,dst=3:5
GOTO start
:vcidvd
SET TZ=GHO-01:00
MOUSE.COM
echo Busy to make VISTA DVD image...
ghost.exe -clone,mode=pdump,src=3:5,dst=@CD-R1\w7COMPLEET.GHO -Z9 -auto
GOTO start
:vridvd
SET TZ=GHO-01:00
MOUSE.COM
echo Busy to restore VISTA DVD image...
ghost.exe -clone,mode=pload,src=@CD-R1:\w7COMPLEET.GHO:1,dst=3:5
:smalcapino
alcapino.bat
:reboot
cd\
af4.exe
Ik zit met een onverklaarbaar probleem.
Mijn kennis van batch files maken is niet erg hoog. Maar dit is helemaal een raadsel.
Vraagje tussendoor: ondersteund het DOS voor win98 choice command ook meer dan 9 keuze opties? (errorlevels). Ik kon daar niks over vinden op google.
Probleem:
Onderstaande batch file om ghost te automatiseren deed het eerst prima en van de één op de andere dag accepteerde hij alleen de eerste optie
Dus als ik optie 1 kies dan gaat hij ook echt exit. Maar als ik optie 2 toets dan voert hij gewoon optie 1 (dus exit) uit terwijl hij bij toets 2 toch echt, zoals te lezen is, naar de xridvd moet gaan.
Hiervoor heb ik ook menu's staan die wel gewoon werken
Wat heb ik geprobeerd en niet werkte:
- GOT search
- Google search
- alle cijfers door letters vervangen zodat ik tot "S" kon gaan.
- ingekort naar 2 opties (zie errorlevel)
- choice:/c12 choose a command from 1 till 8 en choice:/c<a t/ms> choose a command from 1 till 8
- CHOICE/C:12
- volgorde errorlevels omgedraaid. Begon met s en teruglopend, daarna a,b,c,d, etc. van gemaakt.
- alle :<code> weggehaald en alleen de :xridvd laten staan.
- "CD\" na :xridvd gezet zodat hij eerst naar root ging en dan mouse en ghost uitvoerde.
- "CD.." na :xridvd gezet zodat hij eerst naar root ging en dan mouse en ghost uitvoerde.
Ik boot vanaf een USB stick in windows 95 dos. Dit werkt prima.
Ook werkt onderstaande batch menu voor laptop prima, wat hetzelfde lijkt als de problematische:
******
@echo off
:start
cls
echo ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»
echo º ***WINDOWS MENU*** º
echo ÌÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ͹
echo º 1. XP create º
echo º 2. XP restore º
echo º 3. XP create DVD º
echo º 4. XP restore from DVD º
echo º-------------------------------º
echo º 5. SUB MENU LAPTOP º
echo º 6. Exit to DOS º
echo º 7. Reboot º
echo ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ
choice:/c1234567 Choose a command from 1 till 7
if errorlevel 8 goto start
if errorlevel 7 goto reboot
if errorlevel 6 goto exit
if errorlevel 5 goto sml
if errorlevel 4 goto ridvd
if errorlevel 3 goto cidvd
if errorlevel 2 goto ri
if errorlevel 1 goto ci
:ci
SET TZ=GHO-01:00
MOUSE.COM
echo Busy to make winnie image...
ghost.exe -clone,mode=pdump,src=2:4,dst=2.5:\OSIMAGES\WINNIE\LAPTOPCOMPLEET.GHO -CNS -Z9 -VDW -NTD -SURE
GOTO start
:ri
SET TZ=GHO-01:00
MOUSE.COM
echo Busy to restore winnie image...
ghost.exe -clone,mode=pload,src=2.5:\OSIMAGES\WINNIE\LAPTOPCOMPLEET.GHO:1,dst=2:4 -SURE -RB
GOTO start
:cidvd
SET TZ=GHO-01:00
MOUSE.COM
echo Busy to make winnie DVD image...
ghost.exe -clone,mode=pdump,src=2:4,dst=@CD-R1:\LAPTOPCOMPLEET.gho -CNS -Z9 -VDW -NTD -SURE
GOTO start
:ridvd
SET TZ=GHO-01:00
MOUSE.COM
echo Busy to restore winnie DVD image...
ghost.exe -clone,mode=pload,src=@CD-R1:\LAPTOPCOMPLEET.GHO:1,dst=2:4 -SURE -RB
GOTO start
:sml
LAPTOP.BAT
:reboot
af4.exe
Ik weet het niet meer. Ik zie ook geen vreemde code erin.
De batchfile moet gewoon mijn errorlevels onthouden. Dus bij 2 indrukken moet hij naar :xridvd gaan en onderstaande code uitvoeren, etc. :
SET TZ=GHO-01:00
MOUSE.COM
echo Busy to restore W7 DVD image...
ghost.exe -clone,mode=pload,src=@CD-R1:\w7COMPLEET.GHO:1,dst=3:3
GOTO start
Problematische batchfile:
@echo off
rem plaats -SURE en -Z9 bij image create. Bij restore ook -RB
:start
cls
echo ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»
echo º ***WINDOWS MENU*** º
echo ÌÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ͹
echo º A. XP create º I. 2k8server create º
echo º B. XP Restore º J. 2k8server restore º
echo º C. XP create DVD º K. 2k8server create DVD º
echo º D. XP restore from DVD º L. 2k8server restore from DVD º
echo º---------------------------º--------------------------------º
echo º E. win7 create º M. vista create º
echo º F. win7 restore º N. vista restore º
echo º G. win7 create DVD º O. vista create DVD º
echo º H. win7 restore from DVD º P. vista restore from DVD º
echo º------------------------------------------------------------º
echo º Q. SUB MENU ALCAPINO º
echo º------------------------------------------------------------º
echo º R. Exit to DOS º
echo º S. Reboot º
echo ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ
CHOICE/C12
if errorlevel 1 goto exit
if errorlevel 2 goto xridvd
:xci
cls
SET TZ=GHO-01:00
MOUSE.COM
echo Busy to make XP image...
ghost.exe -clone,mode=pdump,src=3:2,dst=3.6:\IMAGES\GHOST\ALCAPINO\XPCOMPLEET.GHO -CNS -VDW -NTD
GOTO start
:xri
SET TZ=GHO-01:00
MOUSE.COM
echo Busy to restore XP image...
ghost.exe -clone,mode=pload,src=3.6:\IMAGES\GHOST\ALCAPINO\XPCOMPLEET.GHO:1,dst=3:2
GOTO start
:xcidvd
SET TZ=GHO-01:00
MOUSE.COM
echo Busy to make XP DVD image...
ghost.exe -clone,mode=pdump,src=3:2,dst=@CD-R1\XPCOMPLEET.GHO -Z9 -auto
GOTO start
:xridvd
SET TZ=GHO-01:00
MOUSE.COM
echo Busy to restore XP DVD image...
ghost.exe -clone,mode=pload,src=@CD-R1:\XPCOMPLEET.GHO:1,dst=3:2
GOTO start
:7ci
SET TZ=GHO-01:00
MOUSE.COM
echo Busy to make W7 image...
ghost.exe -clone,mode=pdump,src=3:3,dst=3.6:\IMAGES\GHOST\WIN7\w7COMPLEET.GHO -CNS -Z9 -VDW -NTD
GOTO start
:7ri
SET TZ=GHO-01:00
MOUSE.COM
echo Busy to restore W7 image...
ghost.exe -clone,mode=pload,src=3.6:\IMAGES\GHOST\WIN7\w7COMPLEET.GHO:1,dst=3:3
GOTO start
:7cidvd
SET TZ=GHO-01:00
MOUSE.COM
echo Busy to make W7 DVD image...
ghost.exe -clone,mode=pdump,src=3:3,dst=@CD-R1\w7COMPLEET.GHO -Z9 -auto
GOTO start
:xridvd
SET TZ=GHO-01:00
MOUSE.COM
echo Busy to restore W7 DVD image...
ghost.exe -clone,mode=pload,src=@CD-R1:\w7COMPLEET.GHO:1,dst=3:3
GOTO start
:2k8ci
SET TZ=GHO-01:00
MOUSE.COM
echo Busy to make SERVER 2K8 image...
ghost.exe -clone,mode=pdump,src=3:4,dst=3.6:\IMAGES\GHOST\S2K8\S2K8COMPLEET.GHO -CNS -Z9 -VDW -NTD
GOTO start
:2k8ri
SET TZ=GHO-01:00
MOUSE.COM
echo Busy to restore SERVER 2K8 image...
ghost.exe -clone,mode=pload,src=3.6:\IMAGES\GHOST\S2K8\S2K8COMPLEET.GHO:1,dst=3:4
GOTO start
:2k8cidvd
SET TZ=GHO-01:00
MOUSE.COM
echo Busy to make SERVER 2K8 DVD image...
ghost.exe -clone,mode=pdump,src=3:4,dst=@CD-R1\S2K8COMPLEET.GHO -Z9 -auto
GOTO start
:2k8ridvd
SET TZ=GHO-01:00
MOUSE.COM
echo Busy to restore SERVER 2K8 DVD image...
ghost.exe -clone,mode=pload,src=@CD-R1:\S2K8COMPLEET.GHO:1,dst=3:4
:vci
SET TZ=GHO-01:00
MOUSE.COM
echo Busy to make VISTA image...
ghost.exe -clone,mode=pdump,src=3:5,dst=3.6:\IMAGES\GHOST\VISTA\w7COMPLEET.GHO -CNS -Z9 -VDW -NTD
GOTO start
:vri
SET TZ=GHO-01:00
MOUSE.COM
echo Busy to restore VISTA image...
ghost.exe -clone,mode=pload,src=3.6:\IMAGES\GHOST\VISTA\w7COMPLEET.GHO:1,dst=3:5
GOTO start
:vcidvd
SET TZ=GHO-01:00
MOUSE.COM
echo Busy to make VISTA DVD image...
ghost.exe -clone,mode=pdump,src=3:5,dst=@CD-R1\w7COMPLEET.GHO -Z9 -auto
GOTO start
:vridvd
SET TZ=GHO-01:00
MOUSE.COM
echo Busy to restore VISTA DVD image...
ghost.exe -clone,mode=pload,src=@CD-R1:\w7COMPLEET.GHO:1,dst=3:5
:smalcapino
alcapino.bat
:reboot
cd\
af4.exe
[ Voor 1% gewijzigd door Al Capino op 10-08-2009 23:37 . Reden: Typootje ]