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

x
?
Solved

LOCK THE WINDOWS WITH VB PROGRAM

Posted on 1999-07-27
9
Medium Priority
?
259 Views
Last Modified: 2010-04-30
HOW CAN I LOAD A VB PROGRAM FROM THE TIME WINDOW start up(not the way put it in start up folder, I want it to be loaded even user delete the shortcut to my program in start up folder) and lock the windows 95/98 from being used by other people who do not have my VB program password(other user can not do any trick to bring out the windows 95/98 explorer or other application)? How to make sure no body can delete my application file? What about doing it in windows NT for the above mentioned thing?
Please include code and detail explanation.
0
Comment
Question by:yuanwuhui
[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
  • 3
  • 2
  • 2
  • +1
9 Comments
 
LVL 12

Expert Comment

by:mark2150
ID: 1527728
You really cannot force your program to run no matter what and it's not a good idea anyway. A user can simply reboot and press <F8> to block windows from launching, rename your .EXE file and that, as they say, is that.

Even if it were possible to make your program impossible to stop from loading you don't want to do that. If you did how would you issue updates? How do you handle a runtime error (and don't give me that line about how your code never crashes - we all have crashes, some of us more often than others)

You have to allow windows to launch to support VB. About the only thing you can do is rename your program EXPLORER.EXE and hope that windows thinks it's part of itself.

As for preventing the file from being erased or renamed, this is impossible for someone with physical access to the workstation. Oh you can mark the file hidden and Read/Only, inhibit flopppy boot, password the BIOS, set system policies, etc. but all of these can be bypassed by a determined hack (like myself) - usually in a matter of minutes.

Most programmers overrate the importance of their particular program... Stuff that takes over the machine just doesn't sell except in kiosk apps and other dedicated/embedded tasks.

As for writing a password program, just where are you going to store the password? In the EXE? If I can run FC (File Compare) I'll find the changed bytes in seconds. In the Registry? Thats an open book. In an external file? Like DIR /O-D won't bubble it to the top. Now you can go on about encryption, etc., but 99.99% of roll-your-own encryption is as difficult to crack as a crossword puzzle.

If you really want to take over a machine you need to run a DOS box in a dedicated app mode. It won't be pretty, but it's a *LOT* more secure than what you can do with any flavor of windows.

M

0
 
LVL 1

Expert Comment

by:bshuler072699
ID: 1527729
To run an application before all others you can put it in the RunServices key in the registry.

To catch all keys that may task switch or CLRL-ALT-DEL, you will need a System level keyboard hook. I sugest Desaware SpyWorks. It can be done from vb, but you would be better off sticking with Dan's code. HTTP://www.desaware.com

You can force your application to the top by using ForceForward from Karl Petersons site. HTTP://www.mvps.org/VB

Once inside the operating system, it is dificult to keep people from undoing your app. What works well is to have an app that watches for the primary app to be removed, then puts it back. Win98 is inherently insecure. I realize that the Watcher App is a lame idea, but with Win98 it is about as good as you can get.

If you want to do this with WindowsNT, you realize it is fairly secure already... It has an authentication mechanism already. If you want to write your own, you must write it to be compatible with the GINA API. You can find out more about GINA by doing a library search at htttp://msdn.microsoft.com/

This might not be the answer you were looking for.... but it is the answer.
0
 
LVL 8

Expert Comment

by:vettranger
ID: 1527730
Hi Mark,

This is (almost) exacly what I told a fellow asking the same question last week. He accused me of being "holier than thou". LOL

Its absolutely true that if you need foolproof security for a workstation, and you are using Windows, you've already started out badly by picking the wrong platform.

Serious security isn't even attempted for this type of OS, meant expressly for home and light business users. The Microsoft support lines would otherwise be completely filled with users who couldn't use their computers anymore! LOL
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:yuanwuhui
ID: 1527731
-->To catch all keys that may task switch, I still prefer to do it in VB, and would to have a code for that.
-->I can't find the  ForceForward from Karl Petersons site. HTTP://www.mvps.org/VB 
--> Any sample code for doing it in WIndows NT
Thank you for your fast response!
0
 
LVL 1

Accepted Solution

by:
bshuler072699 earned 750 total points
ID: 1527732
If you want to write it in a low level KB hook in VB... good luck. You will need to use:
SetWindowsHookEx, UnhookWindowsHookEx, CallNextHookEx, using WH_KEYBOARD type hooks. If you need more than this then you will need to send me a Purchace Order


The exact URL for ForceFore is http://www.mvps.org/vb/code/ForceFore.zip

If you can not write a GINA app in VB Because VB can only create ActiveX Dlls and can only use object which have an IDispach interface.
0
 
LVL 12

Expert Comment

by:mark2150
ID: 1527733
vettranger,

Yeah, M$ would have the masses believe their hype. The recent upsurge in destructive virus is another M$ feature gone stupid.

There is nothing you can do to stop a dedicated hacker that has physical access to your workstation from eating every spec of data on it. There are just too many holes to try and plug that make it impossible to safeguard a system in any serious sense.

After he's taken all of the steps outlined above he'll find out that you can open the HD from the IE4 browser - another questionable M$ "feature".

I run a 250 station call center and the floor folx will find *every* little hole. You right click in the browser and you can use the "Save Image As" feature to overwrite any damn file on the system. You can also browse to C:.

M

0
 
LVL 8

Expert Comment

by:vettranger
ID: 1527734
Mark,

It doesn't really even take a dedicated hacker, just someone with any experience at all in trouble shooting booting a Windows PC. Anyone who's ever had to hit F8 knows how to defeat pretty much any security. ;-)

Security is one of the few areas that mainframes and minis still have some advantage over the PC.
0
 

Author Comment

by:yuanwuhui
ID: 1527735
Thanks!
0
 
LVL 12

Expert Comment

by:mark2150
ID: 1527736
Yep. Oxymoron: Win95 Security

M

0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses

664 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