Jump to content

CDShell PROBLEM!


Macho

Recommended Posts

Hello! I have a problem with CDShell... it will not boot on some computers... better... in som CD/DVD drives!

here is my code... it could be in it? Oh... sorry... it's in slovene...

# cdshell.cds
# Nastavitev za cas pred zagonom z diska (v sekundah)
set counter = 6

cls
print "Pritisni tipko za zagon s CDja"

# Cakanje na tipko ali pa boot z diska
boot:

set counter = $counter - 1
print "."
if $counter == 0; Then goto noboot
getkey 1 goto boot

# Klic okvirja
noboot:

# Nastavitev glavnega menija
# Tukaj se lahko nastavi potrebne parametre

set textColor = color[brightgreen on black]
set titleColor = color[yellow on blue]
set helloColor = color[white on black]
set opisColor = color[brightgreen on black]
set menuColor = color[yellow on black]
set normalColor = color[brightgrey on black]
set clockColor = color[brightgrey on black]
set selColor = color[brightred on black]

set Selected = 1
set menu = 0

script script/okvir.cds

# script script/menu.ini

end

# script/okvir.cds
# startup

font fonts/cp852.f16

set monthCheck = $dateMonth
set lastkey=key[y]

set verzija="Ver. 1.01"
set datum="5.4.2007"
set avtor="Bostjan Bele, TK Celje"

set menuCursorBegin = 7
set opisCursorBegin = 22
set helloCursorBegin = 3

set title="Multi CD Windows XP"

set copyright="Multi CD je ustvaril $avtor dne $datum"

set opis="Tipka <ESC> za restart, <> ali <> za premik in <ENTER> za izbiro"

cls
# Risanje menija
set lines=25

okvir:

# Izpis naslova
title:
set textCursorY = 1
set textColor=$normalColor
print c "ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ"
set textColor = $titleColor
print c " $title $verzija "

# Nastavitev kurzorja in barve za komande
set textCursorY = $opisCursorBegin-2
set textCursorX = 0
set textColor = $normalColor
print c "ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ"

# Izpis avtorske vrstice;)
set textCursorY = $opisCursorBegin-2
set textCursorX = 0
print c "[$copyright]"

# Nekje mora prit se opis (na dnu;))
set textCursorY=$lines
set textCursorX = 0
set textColor=$normalColor
print c "ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ"
print c "[$opis]"

# Treba se je odlocit kateri meni naj nalozimo;)
if ($menu == 0); then script script/menu0.cds
if ($menu == 1); then script script/menu1.cds

goto okvir

# script/menu0.cds
# prvi meni

set comms = 4 # Nastavimo stevilo komand

set comm1 = "Nalozi Windows XP SP2"
set opis1 = "Instalacija programa Windows XP SP2 z nekaterimi nujnimi programi."

set comm2 = "Password cracker"
set opis2 = "Ste pozabili vase geslo? Tale program vam pomaga nastaviti drugega!"

set comm3 = "MemTest"
set opis3 = "To je program Memtest86+ ver. 1.65, ki testira delovni spomin."

set comm4 = "DocMemory"
set opis4 = "To je program DocMemory ver. 3.1 beta, ki testira delovni spomin."

set katmenu = "Glavni meni"

menu:

# Izpis pozdravne vrstice
set textCursorY = $helloCursorBegin
set textColor = $helloColor
print c "$katmenu"

set textColor = $menuColor
set textCursorY = $menuCursorBegin-1

# Tukaj se pa zacnejo komande
commz:

set textCursorY=$textCursorY+1
print c " $comm1 "

set textCursorY=$textCursorY+2
print c " $comm2 "

set textCursorY=$textCursorY+1
print c " $comm3 "

set textCursorY=$textCursorY+1
print c " $comm4 "

# Oznacitev
selectedComm:
set textColor=$opisColor
set textCursorY=$opisCursorBegin
call clean
print c "$(opis$Selected)"
set textCursorY=$menuCursorBegin-1+$Selected
if ($Selected > 1); then set textCursorY = $textCursorY+1
set textColor=$selColor
print c "-=[ $(comm$Selected) ]=-"

# Izpis casa
set textColor= $clockColor

ura:

# Function to display date
date:
if ($dateMonth != $monthCheck); Then script script\okvir.cds # Pri spremembi meseca moramo povozit tekst z okvirjem

set month = "$dateMonth\."
if $dateMonth == 1; then set month = "Januar"
if $dateMonth == 2; then set month = "Februar"
if $dateMonth == 3; then set month = "Marec"
if $dateMonth == 4; then set month = "April"
if $dateMonth == 5; then set month = "Maj"
if $dateMonth == 6; then set month = "Junij."
if $dateMonth == 7; then set month = "Julij"
if $dateMonth == 8; then set month = "Avgust"
if $dateMonth == 9; then set month = "Septebmer"
if $dateMonth == 10; then set month = "Oktober"
if $dateMonth == 11; then set month = "November"
if $dateMonth == 12; then set month = "December"

set textCursorX= 0
set textCursorY= 0
print l " $dateDay\. $month $dateYear"
print r "$timeHour:$timeMinute:$timeSecond "
getkey 1 goto ura

# Cakamo na pritisnjeno tipko
tipka:
if ($lastkey == key[down]); then goto down
if ($lastkey == key[up]); then goto up
if ($lastkey == key[enter]); then goto SelEnter
if ($lastkey == key[f1]); then goto f1
if ($lastkey == key[f2]); then goto f2
if ($lastkey == key[esc]); then reboot

# if ($lastkey == key[space]); then exit

goto menu

# Tipka F1 (sprememba barv;))
f1:
set textColor = color[brightgreen on blue]
set titleColor = color[yellow on red]
set helloColor = color[white on blue]
set opisColor = color[brightgreen on blue]
set menuColor = color[yellow on blue]
set normalColor = color[brightblue on blue]
set clockColor = color[brightgrey on blue]
set selColor = color[brightred on blue]

script script/okvir.cds

# Tipka F2 (druga barvna tema)
f2:
set textColor = color[brightgreen on black]
set titleColor = color[yellow on blue]
set helloColor = color[white on black]
set opisColor = color[brightgreen on black]
set menuColor = color[yellow on black]
set normalColor = color[brightgrey on black]
set clockColor = color[brightgrey on black]
set selColor = color[brightred on black]

script script/okvir.cds

# Tipka dol
down:
set Selected=$Selected+1
if ($Selected > $comms); then set Selected=1
set lastkey=key[y]
goto menu

# Tipka gor
up:
set Selected=$Selected-1
if ($Selected < 1); then set Selected=$comms
set lastkey=key[y]
goto menu

# Koncno se nekaj zgodi ko stisnemo <ENTER>
SelEnter:
font default
if ($Selected == 1); then goto menu1
if ($Selected == 2); then diskemu bootz/passwdxp.iso
if ($Selected == 3); then memtest
if ($Selected == 4); then cls; then bcdw boot bootz\docmem.bin

set lastkey=key[y]
goto menu

menu1:

set menu = 1
set Selected = 1
script script/okvir.cds

end

clean:
set textCursorX=0
print c " "
set textCursorY=$textCursorY-1
return

script/menu1.cds
# Windows meni

set comms = 3 # Nastavimo stevilo komand

set comm1 = "Avtomatsko nalozi Windows"
set opis1 = "Avtomatska instalacija Windows XP SP2 + Slo MUI + M$ Office 2003"

set comm2 = "Normalno nalozi Windows"
set opis2 = "Instalacija Windows XP SP2 na klasicen nacin."

set comm3 = "NAZAJ"
set opis3 = "Vrnitev v glavni meni"

set katmenu = "Instalacija Windows XP meni"

menu:

# Izpis pozdravne vrstice
set textCursorY = $helloCursorBegin
set textColor = $helloColor
print c "$katmenu"

set textColor = $menuColor
set textCursorY = $menuCursorBegin-1

# Tukaj se pa zacnejo komande
commz:

set textCursorY=$textCursorY+1
print c " $comm1 "

set textCursorY=$textCursorY+1
print c " $comm2 "

set textCursorY=$textCursorY+2
print c " $comm3 "

# Oznacitev
selectedComm:
set textColor = $opisColor
set textCursorY = $opisCursorBegin
call clean

print c "$(opis$Selected)"
set textCursorY = $menuCursorBegin-1+$Selected
if ($Selected > 2)
then set textCursorY = $textCursorY+1
set textColor=$selColor
print c "-=[ $(comm$Selected) ]=-"

# Izpis casa
set textColor = $clockColor

ura:

# Function to display date
date:
if ($dateMonth != $monthCheck); Then script script\okvir.cds # Pri spremembi meseca moramo povozit tekst z okvirjem

set month = "$dateMonth\."
if $dateMonth == 1; then set month = "Januar"
if $dateMonth == 2; then set month = "Februar"
if $dateMonth == 3; then set month = "Marec"
if $dateMonth == 4; then set month = "April"
if $dateMonth == 5; then set month = "Maj"
if $dateMonth == 6; then set month = "Junij."
if $dateMonth == 7; then set month = "Julij"
if $dateMonth == 8; then set month = "Avgust"
if $dateMonth == 9; then set month = "Septebmer"
if $dateMonth == 10; then set month = "Oktober"
if $dateMonth == 11; then set month = "November"
if $dateMonth == 12; then set month = "December"

set textCursorX = 0
set textCursorY = 0
print l " $dateDay\. $month $dateYear"
print r "$timeHour:$timeMinute:$timeSecond "

getkey 1 goto ura

# Cakamo na pritisnjeno tipko
tipka:
if ($lastkey == key[down]); then goto down
if ($lastkey == key[up]); then goto up
if ($lastkey == key[enter]); then goto SelEnter
if ($lastkey == key[f1]); then goto f1
if ($lastkey == key[f2]); then goto f2
if ($lastkey == key[esc]); then reboot

# if ($lastkey == key[space]); then exit

goto menu

# Tipka F1 (sprememba barv;))
f1:
set textColor = color[brightgreen on blue]
set titleColor = color[yellow on red]
set helloColor = color[white on blue]
set opisColor = color[brightgreen on blue]
set menuColor = color[yellow on blue]
set normalColor = color[brightblue on blue]
set clockColor = color[brightgrey on blue]
set selColor = color[brightred on blue]

script script/okvir.cds

# Tipka F2 (druga barvna tema)
f2:
set textColor = color[brightgreen on black]
set titleColor = color[yellow on blue]
set helloColor = color[white on black]
set opisColor = color[brightgreen on black]
set menuColor = color[yellow on black]
set normalColor = color[brightgrey on black]
set clockColor = color[brightgrey on black]
set selColor = color[brightred on black]

script script/okvir.cds

# Tipka dol
down:
set Selected = $Selected+1
if ($Selected > $comms)
then set Selected = 1
set lastkey = key[y] # Da ne pritiska vedno tipke DOL
goto menu

# Tipka gor
up:
set Selected = $Selected-1
if ($Selected < 1)
then set Selected = $comms
set lastkey = key[y] # Da ne pritiska vedno tipke GOR
goto menu

# Koncno se nekaj zgodi ko stisnemo <ENTER>
SelEnter:
font default
if ($Selected == 1); then chain bootz\PRO1.DAT
if ($Selected == 2); then chain bootz\PRO2.DAT
if ($Selected == 3); then goto nazaj

set lastkey = key[y] # Da ne pritiska vedno tipke ENTER
goto menu

nazaj:
set menu = 0
set Selected = 1
script script/okvir.cds

end

clean:
set textCursorX = 0
print c " "
set textCursorY = $textCursorY-1
return

ok... sorry again... it's in slovene... but i think it's understandable... a code is a code :D

it runs in VM, Virtual PC and Vurtual box...

PLEASE help...

BB

Link to comment
Share on other sites


Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...