Restored from previous forum. Originally posted by Danilo.
Franco thinks you should write a bootloader for the bootsector.
This "program" (max. size is 512 bytes) loads some other sectors
(your actual program) and executes it.
But there are some problems you have to think about:
1.) The size problem. Bootloaders are mostly written in ASM and C
2.) There is no operating system.
At booting time no operating system is available,
so many DOS-based languages like QuickBasic cant
be used for this job.
All you have at this time is the BIOS and direct
hardware access.
Another thing:
I´m not sure about some versions of the MS Windows Operating System.
Long time ago i heared that some OS´s check the bootsector
and if its modified, they overwrite it with the own bootloader.
Thats somehow like a little virus protection, but i´m not sure
if this is true fuer Win9x/ME or WinNT/2k/XP.
All together: Forget it
If you dont know all the LowLevel stuff for HardDisk
access (Bootsector, FileSystems, etc..) and a programming
language that can be used for this job (plain C without
addon libs or Assembly), you cant do it.
But, merendo , isnt there a way to disable the F8 key
for booting ??
I think this should be possible... i remember there was
an option for it in Win95 and Win98.
If not, you could look at some other DOS´s like
http://www.freeDOS.org or
http://www.drdos.org , but i think
there is a way to disable F8-boot-menu on Win9x.
BTW:
You said "Its a console app".
You can run only real DOS programs in the "Autoexec.bat".
Windows Console applications, like you can do them
with PureBasic, dont run in a plain DOS environment.
DOS programs and Console applications are NOT the same,
even if it looks like on Windows Operating Systems.
Console applications are available on many operating
systems. On Amiga it was called "shell" and in
Windows and Linux its called "Console".
But like i said, this programs dont work in DOS.
If i were you (you want to use Win95 or Win98), i would
disable the F8-boot-menu and make a BIOS password.
After this is done i would write a DOS application
and insert it in Autoexec.bat.
Ofcourse bootable Floppy and CD-ROM are disabled in BIOS.
But an even better way:
Write a Windows application and take it as your
program manager. Win9x systems had a file called
"System.ini" or so in the Win9x\ directory.
In this file you could change the entry "progman="
(PROGram MANager) from explorer.exe to your own
Windows program.
And this program just registers as a screensaver
(see your other posting) and disables CTRL+TAB, CTRL+ESC etc..
and from now on this is the only program running.
So you turn on the PC and it boots directly into
your windows program without letting the user stop
it somewhere (OK, key before booting - but thats senseless).
You can start other programs with RunProgram() from
your application after the user has entered a valid password.
Isnt this what you want ??
cya,
...Danilo
(registered PureBasic user)