PDA

Click to See Complete Forum and Search --> : Automaticaly running a program


markwestcott
Dec 31st, 1999, 08:41 PM
I am writing some security software, and would like my program to be run before the shell has been loaded and ran from somewhere which is not easily accessible to remove the program starting. Is there any way I can do this?

death
Dec 31st, 1999, 09:01 PM
You could find a way of changing the master boot records and make you app load instead of windows like linux does.
But then you would have to write your own opperating system in system code.
But if you can do that you wouldn't really be posting on this board.
Sorry but that is all I can think of
Unless you make the program load by putting it in the registry, and set up a user account so windows stops at the logon prompt but you program is on top.
You could disable the Ctrl + Alt + Del list as well so you couln't be shutdown
Hope I was some help

B4
Dec 31st, 1999, 09:23 PM
If you put your program in the StartUp folder it will automatically execute when Windows starts up. In your program you would have to make Cntrl+Alt+Delete disabled as well as Alt+Tab. Also, you would want it to be on top of everything else and maximized so that any other window could not be accessed.

-B4

mwdelta
Jan 1st, 2000, 10:48 AM
I was going to suggest adding your program to autoexec.bat, but since I assume you are programming in VB, it won't work in DOS. The earliest you could have your program run is during Windows startup, using VB. There are a couple of options - one is to put a reference to your program in the HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run section of the registry. Another is to add a line with Run=yourprogram.exe to the win.ini file. Both are fairly difficult to remove the program from starting, especially for an inexperienced user. However, someone who knows their way around the registry or MSConfig could shut it down. Hope this helps! :)

Happy New Year!

------------------
Mike Wellems
PowerQuery

mwdelta
Jan 1st, 2000, 10:53 AM
I thought of a few more things about those methods - first, booting in Safe Mode will not launch the program with either method. I actually think VB is not the language to be using to accomplish what you want (although I don't know any others, so can't help you there). If you do use one of those methods, I would suggest that your program confirm that the launch commands are still there when it is shut down. For instance, McAfee AntiVirus rewrites itself into the Run section of the registry every time it is shut down, so if you remove it from the registry while VirusScan is running, it's back in there when you shut your computer off.

------------------
Mike Wellems
PowerQuery

Jan 1st, 2000, 11:27 AM
There is one way you could try it. It's tricky and I have seen it written in VB5. Try to bare with me as I explain it.

There is a Star Trek program that comletely takes over the interface of the Win95/98 interface. I use it and love it. I am in fact working on my own version of this.. but that's another story. Anyways..

This program literally TAKES OVER your WINDOWS Taskbar, thus replacing it with it's own. There is NO WAY around it if you hide your program and no way to delete it since it TOTALLY replaces your Task bar. It ALSO loads without being put in the Startup Menu. How these guys area doing it has got to be with that one file that Operates the Main Win95/98 Interface, once you replace that with your own code, vuala.. I think you would have a GOOD defense. :)

If you want to see an idea of what I am talking about try it here at this link..

http://home.multiweb.nl/~pietvs/

But, it's VERY tough to get rid of once you install this puppy. TRUST ME. I had to literally reinstall WIN98 after this program was installed to get past it. It was AWESOME and sad at the same time.. err. But I was able to save my files at least.. :)

There is one file named USERS32.COM or something like that. This is the file that operates the whole interface. I may be wrong about the file name, but these guys at that link above are GOOD! Eccept for a couple of bugs that's in their program.. errr...


------------------
John T. Mieske
Knight Vision Enterprises
kvision@gate.net


[This message has been edited by Knight_Vision (edited 01-02-2000).]

Clunietp
Jan 1st, 2000, 11:38 AM
If you want to totally replace the GUI (instead of Explorer) set the SHELL= line under the [boot] section in the SYSTEM.INI file to your application's EXE. Remember, the user will NOT have a taskbar, start menu, or desktop, so your GUI better be pretty good! This is a little-known trick and is fun to change to command.com (or similar) to upset the other members in your household (or workplace :))

I believe this only works in Win9x

Enjoy!

Tom

[This message has been edited by Clunietp (edited 01-02-2000).]

markwestcott
Jan 1st, 2000, 01:15 PM
Thanks for everyones help. I really appreciate it. I was aware that the shell could be changed, but I wanted something to make sure that my program is still the shell before windows loads. Does anyone know which runs first, services (things in HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\RunServices) or things in run(HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run).

Thanks in advance,

Mark

Clunietp
Jan 1st, 2000, 02:34 PM
Make a few quick EXEs and have them pop up a message box when they load or something and record it. Place each one in a different startup location. Let us know the order if you do it!

Thanks

markwestcott
Jan 1st, 2000, 03:59 PM
Thanks, great idea. I've done as you suggested and found that the first to run is a service. This executes even before the shell is executed. Things in the startup folder run at the same time as things in the run part of the registry. The only advantage of having things in the run part of the registry is to mean that the end user is less likely to delete it.

Thanks everyone


Mark

Clunietp
Jan 2nd, 2000, 12:28 AM
Thanks for the follow-up Mark. That was interesting to learn

Good luck on your project!

Tom

markwestcott
Jan 2nd, 2000, 12:54 AM
Cheers. And thankyou everyone for their help.

RoundCow
Jan 2nd, 2000, 05:02 AM
Security Software my ass! i did this to my school comps... have fun.