Page 1 of 1

Posted: Fri Sep 27, 2002 12:44 pm
by BackupUser
Restored from previous forum. Originally posted by merendo.

Hi all.

I want my chest to execute a certain programme at startup. But I want it to execute it, and it must not be crackable.

For example if I write an additional line in my autoexec.bat:
password.exe

This method is almost save, but it IS crackable. If the user presses the F8-key before booting, he can select another menu than normal booting and chest doesn't execute the programme.

But I want my chest to execute the programme at startup (in DOS) and the user must not be able to stop it. I am not sure if you understand my problem, but If you do, can you help me?

Cu @ll, merendo
--
I've been hiding - What am I hiding from???

Posted: Fri Sep 27, 2002 4:22 pm
by BackupUser
Restored from previous forum. Originally posted by fweil.

It sounds you have a Microsoft based machine. Isn't it possible to launch your app starting up you PC like any start-up application ? It is.

If you lock then any possibility to exit this application, you should find the way to answer your need.

Hope this help.

Rgrds

Francois Weil
14, rue Douer
F64100 Bayonne

Posted: Fri Sep 27, 2002 4:45 pm
by BackupUser
Restored from previous forum. Originally posted by merendo.

Exiting the app is not the problem. It is the problem that the programme is executed. Because with a few tricks it is possible to disable that start-up apps. But I want this programme to be executed at startup. And you may not do anything against that. That's what I want.

Cu @ll, merendo
--
I've been hiding - What am I hiding from???

Posted: Fri Sep 27, 2002 4:57 pm
by BackupUser
Restored from previous forum. Originally posted by Franco.

Merendo,
Here is a 100% save solution:
1.)remove the floppy from your computer
2.)write a program that is small enough to sit after the partition table of your hd and call it after booting (like the boot manager 'xFdisk')


The bad thing about that is:
you can't use PureBasic for that...


Have a nice day...
Franco

Sometimes you have to go a lonely way to accomplish genius things.

Posted: Fri Sep 27, 2002 5:41 pm
by BackupUser
Restored from previous forum. Originally posted by fweil.

OK Merendo ... is it a windowed application or just something you can run in console mode ?

...

Francois Weil
14, rue Douer
F64100 Bayonne

Posted: Fri Sep 27, 2002 8:18 pm
by BackupUser
Restored from previous forum. Originally posted by merendo.

Its a console app which shall be executed before booting, ie in DOS.

@Franco: I am not god. I am also just a human :). What do you mean with your post, I didn't understand anything.

Cu @ll, merendo
--
I've been hiding - What am I hiding from???

Posted: Sat Sep 28, 2002 2:37 am
by BackupUser
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)

Posted: Sat Sep 28, 2002 11:56 am
by BackupUser
Restored from previous forum. Originally posted by merendo.

Danilo, you are very talented in writing long texts :) I am going to try to change the explorer.exe. As you said, windows doesn't run any other app when booting is finished.

Cu @ll, merendo
--
I've been hiding - What am I hiding from???

Posted: Mon Sep 30, 2002 4:21 pm
by BackupUser
Restored from previous forum. Originally posted by Franco.

Hi Merendo,
Danilo's explanation is right - it's not easy to do it.

Only one thing:
You can write such a software not only in asm and c, you can also use pascal.
As an example: the xFdisk boot manager. It's written in pascal (coders: Painke/Mueller from Germany...)

Have a nice day...
Franco

Sometimes you have to go a lonely way to accomplish genius things.

Posted: Tue Oct 01, 2002 12:40 pm
by BackupUser
Restored from previous forum. Originally posted by merendo.

Well, I also know somebody who codes very well (perfectly) in Delphi. And as far as I know, delphi is nothing else than turbo-pascal. And I know him personally, he lives in the town where I was born (Füssen)

Cu @ll, merendo
--
I've been hiding - What am I hiding from???

Posted: Tue Oct 01, 2002 5:48 pm
by BackupUser
Restored from previous forum. Originally posted by Danilo.

merendo, dont mix things up here.

Delphi is NOT for DOS, think about it.
And not all DOS-languages are good for writing
boot-managers, because you cant use any DOS-call (INT 21h)
at this time. Just plain BIOS and hardware access.

There is a reason i said _mostly C and ASM_.
Standard TurboPascal doesnt work for that, because
the commands in the Pascal Libraries use DOS
Interrupts too... so this would be a nice crash.

Also, the bootcode must be written to be executed
at a certain memory location and not like standard
.EXE or .COM binaries.
It was like 0000:7C00 or something (long time ago.. :))

You _can_ use Pascal with some modifications
to the libraries, so they dont use DOS INTs,
you could use Inline ASM or you could write
your own libs for Pascal. You just cant use
the standard commands that use DOS calls.

Another thing:
You cant produce a .EXE without thinking
how to put it in the bootsector.
The bootsector is plain Code with 2 Bytes ($AA,$55)
DATA at the end, and not an format like .EXE.
512 bytes alltogether is all you have, so its much
easier to write it in ASM.
We are talking about the bootsector only here, not the
code that gets loaded by it!

If you really want to do that (i explained easier way),
you must know what you are doing.
And if you want to use DOS-Pascal, you should take
a look at FreePascal. This should be better for this
task as TurboPascal or BorlandPascal.

You dont know the LowLevel stuff for that, so
better replace Explorer in system.ini and you
could write a PureBasic program for it.

WARNING: *IF* you really want to do that stuff,
you do it at your own risk !!
Doing something wrong with this could mess up
your whole harddrive, so NEVER EVER test it with
your main harddrive with windows on it!
(wouldnt boot windows anyway).

cya,
...Danilo

(registered PureBasic user)

Posted: Tue Oct 01, 2002 6:08 pm
by BackupUser
Restored from previous forum. Originally posted by Franco.

As Danilo said - Delphi/Kylix is for Windows/Linux only.
You can't write very low-level stuff with it.
The same is with PureBasic, you get always the exe or dll header. You always need an os for it.
Programs like a Bootmanager need to have build-in code to access the hardware.
And you need a lot of low-level knowledge to do all things right - otherwise you will screw up your HD.

My first mail was only an example for a 100% save solution. Not everybody could write code for that.


Have a nice day...
Franco

Sometimes you have to go a lonely way to accomplish genius things.

Posted: Wed Oct 02, 2002 5:56 pm
by BackupUser
Restored from previous forum. Originally posted by merendo.

Ok, ok, everything is quite fine!!! But is there another sollution?

Cu @ll, merendo
--
I've been hiding - What am I hiding from???