home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World 2001 May
/
PCWorld_2001-05_cd.bin
/
Software
/
Vyzkuste
/
tiptrik
/
tiptrik.exe
/
Qb-reg.bas
< prev
next >
Wrap
BASIC Source File
|
2001-03-04
|
1KB
|
51 lines
COLOR 15, 1
CLS
sysdrive$ = LEFT$(ENVIRON$("winbootdir"), 1)
PRINT "Hledám QBasic.EXE..."
LOCATE 5, 1
bef$ = "command.com /c dir /s /b " + sysdrive$ + ":\qbasic.exe"
SHELL bef$
FOR n = 1 TO 79
char$ = CHR$(SCREEN(5, n))
pfad$ = pfad$ + char$
IF char$ = "\" THEN pfad$ = pfad$ + "\"
NEXT
pfad$ = RTRIM$(UCASE$(pfad$))
IF INSTR(pfad$, "QBAS") = 0 THEN
LOCATE CSRLIN + 2: PRINT "QBasic.EXE nebyl nalezen..."
SYSTEM
END IF
LOCATE 15, 1
PRINT pfad$ + " bude uloºena v registru v klíƒi .BAS."
LOCATE CSRLIN + 2: PRINT "Souhlasíte? (A)"
DO
i$ = INKEY$
LOOP WHILE i$ = ""
IF UCASE$(i$) <> "A" THEN SYSTEM
OPEN "c:\qbasic.reg" FOR OUTPUT AS #1
PRINT #1, "REGEDIT4"
PRINT #1, ""
PRINT #1, "[HKEY_CLASSES_ROOT\.BAS]"
PRINT #1, "@=" + STRING$(2, CHR$(34))
PRINT #1, "[HKEY_CLASSES_ROOT\.BAS\shell]"
PRINT #1, "[HKEY_CLASSES_ROOT\.BAS\shell\open]"
PRINT #1, "[HKEY_CLASSES_ROOT\.BAS\shell\open\command]"
PRINT #1, "@=" + CHR$(34) + pfad$ + " /run %1" + CHR$(34)
PRINT #1, "[HKEY_CLASSES_ROOT\.BAS\shell\Editovat]"
PRINT #1, "[HKEY_CLASSES_ROOT\.BAS\shell\Editovat\command]"
PRINT #1, "@=" + CHR$(34) + pfad$ + " %1" + CHR$(34)
PRINT #1, ""
CLOSE #1
SHELL "regedit /s c:\qbasic.reg"
SLEEP 2
KILL "C:\qbasic.reg"
SYSTEM