Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Ok folks. Here's a good one. I am w

Status
Not open for further replies.

dwhitlow

MIS
Mar 1, 2000
40
US
Ok folks. Here's a good one. I am writing a program that requires the user to agree to the corporate data security policy before being allowed to continue. They only want it to appear every 30 days. I have set it up so that my program is the shell, and calls explorer.exe if the user selects Yes, or if it has been less than 30 days since they were last prompted. That solves the problem of not closing my program and just opening up something else on the desktop. My problem now is that they can hit Ctrl-Alt-Del, click on Task Manager, and select New Task. Then they can start what they want. I can't edit the registry setting that disables Task Man. because the user doesn't have rights to those keys. Kind of a catch 22, eh? Any ideas?
 
There's a quick and dirty way to do it....

Why don't you monitor all tasks started after your app takes control and then terminate them with PostMessage. Easy enough to perform from a timer control and, since you won't be worried about creating a "friendly" experience while preventing the user from running other apps, why not throw in a warning dialogue and shut the machine down if the user persists in attempting to bypass your program's efforts.
VCA.gif

Alt255@Vorpalcom.Intranets.com​
 
Glad I could help. Let me know if you decide to use this approach and need a hand ironing the inevitable wrinkes.
VCA.gif

Alt255@Vorpalcom.Intranets.com​
 
You could, alternatively, place some entries in the registry. On the start up of your program, set some entry to a specific value - indicating that the user has not yet seen the dialog box for the security agreement. When the dialog box appears, let it set the registry value to the user selection (O.K. NOT O.K.) then procede to the program. Let the program check the registry entry - If it is "O.K." then reset the entry to "running" and continue. Otherwise, set the value to 'bypass', initiate some message to the ADMIN (you), with the machine ID, User ID, DateTime stamp and any other relevant info you want. Then shut down the machine.

For real hardcore stuff, have a startup program which checks the registry key - and refuses to complete the startup process until the registry value is cleared (requires the ADMIN password). Then, violators not only experience the not so gentle reminder - the experience it "PUBLICLY".


MichaelRed
redmsp@erols.com

There is never time to do it right but there is always time to do it over
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top