Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Automatic start program

Posted on 1999-06-23
67
Medium Priority
?
445 Views
Last Modified: 2010-08-05
Can I make program which will be start evry time when computer is turn on (I am using Windows 98 as operating system, and don't tell me to put command in AUTOEXEC.BAT).

Thank's
0
Comment
Question by:mmilan
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
67 Comments
 
LVL 6

Expert Comment

by:kschang
ID: 1218476
So WIN.INI or STARTUP group is not acceptable either?
0
 

Author Comment

by:mmilan
ID: 1218477
No. I want to make program which will be start before Windows is start. Something like starting AUTOEXEC.BAT.
0
 
LVL 6

Expert Comment

by:Triskelion
ID: 1218478
You need to register your program as a SERVICE.
You can use a program that comes in the NT resource kit called SRVANY.EXE.   For a detailed explanation, check out
http://acs.neu.edu/~mcknight/srvany.html
0
On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

 

Author Comment

by:mmilan
ID: 1218479
I asked about Windows 98 or MS-DOS, not Windows NT!
0
 
LVL 1

Expert Comment

by:FuzzyLogic
ID: 1218480
Is it a program that should stay resident, or something like password checking that should be executed, and when terminated the windows is starting?


0
 
LVL 1

Expert Comment

by:nrico
ID: 1218481
You should put the address of your program in the registry under the key (string):
HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\Currentversion\Run\Whatevernameyouwish

There is no other way.
0
 
LVL 1

Expert Comment

by:FuzzyLogic
ID: 1218482
There is not such a thing as there is no other way :-)
0
 
LVL 1

Expert Comment

by:nrico
ID: 1218483
Okay, this is the easiest (?) way to make a program start up before other Win-programs, and it can't be removed by a user, like when it was in the folder Startup. Furthermore, it's not user-dependent.
The only catch is that you can't edit the registry with TP. You need (an installer in )Delphi to do that.
0
 
LVL 6

Expert Comment

by:kschang
ID: 1218484
BEFORE Windows start... Like a boot sector virus?  :-)
0
 

Author Comment

by:mmilan
ID: 1218485
Yes kschang something like this, but it's not virus. I want to make password protection.
0
 
LVL 15

Expert Comment

by:simonet
ID: 1218486
Add your program to the Registry (Win 9x, but not NT), under:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\RunServices

The name of the entry will be any name you want to give, like "PwdChecker" and the value of the entry will be the fully qualified name of your EXE. This way your program will run *before* the is given access to the password dialog box.

Yours,

Alex
Athena's Place: http://www.bhnet.com.br/~simonet


0
 

Author Comment

by:mmilan
ID: 1218487
People I know all that you said. Lets little change question: MY PROGRAM IS WRITTEN IN TURBO PASCAL FOR DOS, AND I WANT TO START IT FROM MS-DOS (FOR EXAPLE MS-DOS 6.0). HOW, HOW CAN I DO THAT?
0
 
LVL 15

Expert Comment

by:simonet
ID: 1218488
Add it to config.sys then.

Alex
0
 

Author Comment

by:mmilan
ID: 1218489
I know that. I want to make something that work like boot sector virus. Do you know how?
0
 
LVL 15

Expert Comment

by:simonet
ID: 1218490
Ohohoho.. now you said what you really want!!! Yes I know how to do that, but that's not the kinda information I give away. First of all, I don't know what your intentions are, and, second, even if I were willing to give away this sort of information, 200 points wouldn't pay for it.

This is very dangerous information and, if fallen in wrong hands, can be quite destructive. See what a guy did when he learned how to create word macros? He wrote Melissa. Now, boot sector initialization is a lot more delicate issue.

Well, sorry, but I am not answering this one.

Alex
0
 

Author Comment

by:mmilan
ID: 1218491
Hey man, you think if I want to write virus I ask you for help. You are crazy. I want to make program for password protection of enter if computer (if I start my protection program from AUTOEXEC.BAT or something like that people can easy bypass it. I am looking for better way of starting protection program and I thought that way I said is good. Do you have any other idea? If so, let me know!

Thank's.
0
 
LVL 1

Expert Comment

by:quanghoc
ID: 1218492
  OK, this is possible. You need to change file Command.com in Win95. Using a little assembler. You add something like a "call" function to jump to another address. This command takes at least 6 bytes (I'm sure how large it is). You also need to move the first 6 bytes to the new address. This is a structure:
 + Old Command.com:

0100: PUSH ES  
....: POP  SS
....: ...
....: ...
....: ...

 + New Command.com:
   
0100: CALL ????                ; "????" is the new address that
....: ...                      ; you can make your own function to call a .exe file
....: ...
....: ...

????: ...                      ; Now, you can do your work
      ...                      ; Remember that you need to do anything again before
      ...                      ; return to that main part of Command.com

   That was what I know. I'm so lazy to write the whole thing. This is the hard one. You must spend a lot of time to finish it.
Good luck.
0
 
LVL 6

Expert Comment

by:My name is Mud
ID: 1218493
>>...if I start my protection program from AUTOEXEC.BAT or something like that people can easy bypass it...

You're right about that, but:

>>You should put the address of your program in the registry under the key (string):         HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\Currentversion\Run\Whatevernameyouwish

Then when before windows start somebody can press "Shift" key or go to F8 "safe mode" and bye bye your proggy

What's the matter with you people, if you want password protection go to setup and place a password after turn on the machine. Now if you're obstinate in do it the other way, the god help you.

PS: why the heck did you post this question in here, when you could post it in the windows 95 section???
0
 
LVL 6

Expert Comment

by:kschang
ID: 1218494
No need to muck with command.com. BOOT SECTOR contains a program that bootstraps the rest of the O/S. If you modify the boot sector to load YOUR program first (obviously this program would have to be QUITE SMALL), THEN pass control to COMMAND.COM then you would accomplish what you want.

HOWEVER, it's still quite easy to bypass this: boot disk.
0
 
LVL 6

Expert Comment

by:My name is Mud
ID: 1218495
Suppose he/she have a disk of more than 2 (and fractions) Gb. as we know those disk can be accessed.
0
 

Author Comment

by:mmilan
ID: 1218496
For whatboy: I am making program in Turbo PAscal 6.0! Is this good reason?
0
 

Author Comment

by:mmilan
ID: 1218497
Hey kschang, do you know how can I do that?
0
 
LVL 6

Expert Comment

by:My name is Mud
ID: 1218498
>>Suppose he/she have a disk of more than 2 (and fractions) Gb. as we know those disk can be accessed.

What i mean is, if you or who ever intend to boot before the OS (DOS v7.0 or win95 in the same case) he/she has to do a routine for the proggy to see all the drive (in the case the drive is more than 2.xxGb). or am i wrong???

>>...This is very dangerous information and...

Hey man cut the crap, the only morons how do virus are sick people who have no other thing to do in life but to do what they do, Be a virus. and i don't think mmilan is a frustrated geek (well may be he/she is frustrated but i don't think he/she is a geek).

does any body know of a word to write insted of "HE/SHE"???
0
 
LVL 6

Expert Comment

by:kschang
ID: 1218499
I use s/he. :-)  As for HOW you write a program like that... You got the right equipment. However, you need a few months studying the DOS interrupts and DOS API calls, and boot sector, and some such. Sorry, can't tell you more than that. :-) Though books like "DOS internals" or soemthing like that should help.

And finally... This can EASILY be bypassed by a boot disk... Wait, I already said that...
0
 
LVL 15

Expert Comment

by:simonet
ID: 1218500
>This can EASILY be bypassed by a boot disk...

Right. Not to mention FDISK /MBR.
0
 

Author Comment

by:mmilan
ID: 1218501
Any other suggestion for making protection of enter to system?
0
 
LVL 1

Expert Comment

by:quanghoc
ID: 1218502
 Why don't you use CMOS to protect your computer if you want to do that ??
0
 
LVL 3

Expert Comment

by:vikiing
ID: 1218503
Quanghoc is right; if what you're looking for is a password protection system, ¿why don't use the BIOS password to assure nobody will access the machine?.

With that, no matter where you attempt boot from, it's always activated just BEFORE booting process starts, and the only way to remove its protection is by disconnecting the battery, which implies to open the machine and work enough there.
0
 

Author Comment

by:mmilan
ID: 1218504
It's very easy to bypass CMOS password! Just to switch on jumper on main board :-)
0
 
LVL 1

Expert Comment

by:quanghoc
ID: 1218505
 If so, Why don't you take your hard-disk out when you go away from your computer ? There are thousands of ways to protect. Actually, you can delete some important file of Win98. Nobody know that ...
0
 
LVL 6

Expert Comment

by:My name is Mud
ID: 1218506
>>Why don't you use CMOS to protect your computer if you want to do that ??

>>Quanghoc is right; if what you're looking for is a password protection system...

Hey people i think i already told that...

>>What's the matter with you people, if you want password protection go to setup and place a password after turn on the machine. Now if you're obstinate in do it the other way, the god help you.

>>It's very easy to bypass CMOS password! Just to switch on jumper on main board :-)

Some machines came with locks, if not, and you really want some protection the try putting a "MASTER" lock, those locks are tough to break.
0
 
LVL 3

Expert Comment

by:vikiing
ID: 1218507
>>It's very easy to bypass CMOS password! Just to switch on
>>jumper on main board :-)

But that requires the machine to be opened, and you must deal with battery jumpers and all that. Of course, if anyone wants to access your disk, he can also remove the disk and install it on another machine. There's always a way to skip protection systems; but the goal is to make things so difficult as possible.

0
 
LVL 12

Expert Comment

by:Hypo
ID: 1218508
If it's only a acouple of files you want to protect, why don't you just encrypt them... and decrypt them again whenever you want to use them? It could be like this:
Your program forces the user to enter a password if he want those files to be readable (decrypted). if he don't enter a password the files will never be decrypted/dechiffered.


0
 
LVL 1

Expert Comment

by:quanghoc
ID: 1218509
 Nobody can answer your question just only by Pascal programming.
0
 
LVL 1

Expert Comment

by:quanghoc
ID: 1218510
 Nobody can answer your question just only by Pascal programming.
0
 
LVL 1

Expert Comment

by:FuzzyLogic
ID: 1218511
> HOWEVER, it's still quite easy to baypasss this: boot disk.
Not if the program encripts all the FAT/ROOT/DISK... like some virused did.
But this is much harder to achive, and information can permamently lost easily.
0
 
LVL 6

Expert Comment

by:kschang
ID: 1218512
As previously suggested... Pick up some old DOS programming books, like DOS internals, Pascal System Programming, something like that. One of the old books I have was Norton's Programmer's Handbook.. :-)
0
 
LVL 12

Expert Comment

by:Hypo
ID: 1218513
I wasn't talking about encrypting the whole physical Fat sector, My suggestion was if he only had a few files wich should be protected, encrypring them is a good suggestion. Cuz then there are no bypass, you can either enter the correct password wich will decrypt the files correct, or you could choose not to enter a password wich would reasult in encrypted files. If you enter the wrong password the files will be decrypted wrong.
0
 
LVL 1

Expert Comment

by:BSoeters
ID: 1218514
This is leading nowhere.

In order to protect a machine from intrusion, one can do many things. As suggested, CMOS password could be used. This can be circumvented, like the rest of the stuff.

The best thing to do if you're up to it - and Pascal is gonna get you nowhere now - is to rewrite the bootsector of your harddisk.

The new bootsector would act like the infamous OS selectors like Lilo and System Commander. Adding functionality like a password protection, and disabling access to all other disk partitions by algorithmly destroying and rebuilding parts of all partitions.

This requires a very serious amount of knowledge and understanding of the DOS internals, as well as deep knowledge of BIOS and harddisk data encoding schemes.

I think that these prerequisites are not within your grasp.

Face it: you'd better put your computer in some bunker, lock the door and throw away the key. Best solution so far is to use your CMOS password and you rejected that.

Sorry Mmilan, but I just don't think anybody can help you any further....
0
 
LVL 6

Expert Comment

by:My name is Mud
ID: 1218515
Chain the machine to a croc, if someone goes near it, it'll bite the head off of that sucker. Hee Hee.  =;)
0
 
LVL 1

Expert Comment

by:quanghoc
ID: 1218516
 Not so funny ... Actually, there is no way to protect your computer absolutely. And the hardest way is to do with BOOT SECTOR or COMMAND.COM. If you want some source codes about this, I can send to you. But if you don't understand anything about programming with assember, these will be useless.
0
 
LVL 6

Expert Comment

by:My name is Mud
ID: 1218517
Hey, the croc is funny, more funny than:

>>...But if you don't understand anything about programming with assember, these will be useless.

Yo don't have HUMOR :P
0
 
LVL 1

Expert Comment

by:FuzzyLogic
ID: 1218518
>> ...like the infamous OS selectors like Lilo and System Commander.
Why infamous?? I'm using both SystemCommander and Linuxloader in the same machine!
0
 

Expert Comment

by:suguinha
ID: 1218519
Well, I know how to do what you want, but my program will load BEFORE DOS (it will REWRITE your MBR). If it's OK, I'll send it later.

[]'s
Ricardo Ryoiti Sugawara Junior
Sao Paulo/Brazil

0
 

Expert Comment

by:PhrAtoR
ID: 1218520
i did't read every comment, so i don't know if it was mention. but why don't you write a small asm-prog an attach it to the bootsector? in the mbr is a call to the entry point of the bootroutine. place yout prog there and call the bootroutine from your prog.

i'll give you more information if you want.
i wrote such a prog.

-Phrator
0
 
LVL 1

Expert Comment

by:BSoeters
ID: 1218521
To FuzzyLogic: Ehr, infamous might not be the correct word. I tried to say famous in superlative. EN is not my native language :)
0
 
LVL 1

Expert Comment

by:quanghoc
ID: 1218522
 So, what is this ? Answer a question ???
0
 
LVL 1

Expert Comment

by:FuzzyLogic
ID: 1218523
Apology accepted ;) (and EN is not my native language too).
0
 
LVL 6

Expert Comment

by:My name is Mud
ID: 1218524
What's this... mmilan, you should accept someone answer or delete this ?.
0
 
LVL 1

Expert Comment

by:quanghoc
ID: 1218525
 mmilan cannot delete this question. So, there is only one way : accept somebody's answer ...
0
 
LVL 1

Expert Comment

by:mSH
ID: 1218526
I think that can write a program like COMPAQ computer. It have a partition but with strange partition code. So DOS and Windows cannot recognize that partition. ==> It is hide.

So i think that we should:
- Make a partition (about 2 MB). And it is a bootable partition (code 80). All other partition must change to new code (just partition code).
- Write a program with need a password, rewrite partition code and then restart.
- Write a program with need a password too, to change your partition (2MB) boot table for next time you start.

Is it OK?

0
 
LVL 1

Expert Comment

by:BSoeters
ID: 1218527
Pff, and what an answer that is, mSH. Shame on you.

mmilan: once upon a time (no fairytale) I croshed the path of a little program called disklock. That little program does exactly what you want to achieve, only there's no source code available.

Another option: can't system commander do what you want to accomplish ? If it can, why not use it instead of writing it yourself ? Although I must say that writing such a thing yourself is quite statisfying.
0
 
LVL 4

Expert Comment

by:siabod
ID: 1218528
Wow, this has been fun to read... i like the bunker idea
0
 
LVL 1

Expert Comment

by:LostMyBrain
ID: 1218529
There is a special program for password protection, it's called pcpassword. It works on your partitions table and it starts before dos/win is loaded at all. If anyone will start your computer from the floppydisk he won't be able to access the hard-disk since they won't be exist for him.

If you would like to get the program, please accept the answer.

thanks.
0
 
LVL 1

Expert Comment

by:quanghoc
ID: 1218530
 That was so funny when accepting answer go first and then the answer after ...
0
 

Author Comment

by:mmilan
ID: 1218531
I want to make program for it not to use some program :-)

0
 
LVL 6

Expert Comment

by:Triskelion
ID: 1218532
Can we get rid of this thing?
0
 

Expert Comment

by:Hamilton
ID: 1218533
Hi mmilan,

there's a wild chatting about encrypting files, hiding partitions, installing BIOS passwords, manipulating the COMMAND.COM, adding Windows registry keys, and so on ...
But I think we have just to make clear what's your intention. Do you want
 - to prevent other people from using your PC with its Windows operating system?
 - to deny users the permission to access some (perhaps private) data?
 - to make sure that nobody performs any changes to your system?
or
 - to show others that you're able to write a security program that cannot be bypassed?

Regards,
Hamilton

0
 
LVL 6

Expert Comment

by:My name is Mud
ID: 1218534
Or what about:

 - Take absolute control of all the machines in the world so that mmilan can be the only one who knows the passord... NOOOOOOOOOOoooooooooo·········· :P
0
 

Expert Comment

by:blitzx
ID: 1218535
Well I have never messed up with the Boot sector to make an application to start when you turn on your pc, but i know you have to modify it and maybe this book could be useful to you it's name is PC Intern and i'm sure it has something about dealing with the BOOT sector of a Hard Disk
0
 

Expert Comment

by:Dmitry_
ID: 1218536
You can use the original sofrware to protect you computer, try PGPDisk, www.pgpi.com
0
 

Expert Comment

by:StTail
ID: 1218537
I Think what has everybody said in the past is true. there's nothing we can do to totaly take full control of your computer / system by being access by someone else If you wish to share your computer to others....

Of course you can't expect someone NOT to break your security, NOT to use your computer, NOT to read your data at the same time at one moment. (It's impossible to allow someone to use your computer and disallow someone to enter your system (by blocking him/her by password protection))

If you only try to protect some data that are confidential (means very important to you) and you wish to hide it from others but you still want other users to use your computer and its system, perhaps you could use MagicFolder that can hide directory from being accessed by someone else without Password.

This of course NOT the way to make your own program, but you can considerate this if your time is limitted. (I think MagicFolder has pretty good protection to do this )


0
 

Expert Comment

by:rvde
ID: 1218538
Mmilan,

why don't you just use the config.sys to start your prog, and add as first line in you config.sys switches=/f /u or something like that, it's even better then this "before login" stuff or that Bios thing. The safest way to secure your computer is a removable hdd or secure your power supply by using a pincode.

Rob.
0
 
LVL 6

Expert Comment

by:My name is Mud
ID: 1218539
No no no, i insist, buy your self a CROC, a big one, no better yet a HUGE one, chained to the machine, then no one will get close by, not even you... :)
0
 
LVL 1

Accepted Solution

by:
htam earned 600 total points
ID: 1218540
You should rename your command.com in a another name : example test.exe
You rename your program as command.com
Your system will automaticly run your program when you boot your PC.
At the end of your program you execute the test.exe (= command.com)
It very good, but warning with the IRQ 22. You need to access directly to your peripherics,,,, It is not very hard, but very good
0
 

Author Comment

by:mmilan
ID: 1218541
I'll give you points before I check if this work. I want to stop this discution. Thank's to all of you. It was very interesting....
0
 
LVL 1

Expert Comment

by:quanghoc
ID: 1218542
 Well, this is so simple to crack, too. Don't be so hurry next time . OK !
0

Featured Post

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When trying to connect from SSMS v17.x to a SQL Server Integration Services 2016 instance or previous version, you get the error “Connecting to the Integration Services service on the computer failed with the following error: 'The specified service …
What we learned in Webroot's webinar on multi-vector protection.
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…

722 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question