Solved

Lock Windows XP through my application

Posted on 2007-11-28
6
802 Views
Last Modified: 2013-12-01
I need to write a Delphi application:

- After logging to Windows XP it must be the first program to run.
- When my program starts it will ask user for some authentication information.
- After validation, user will have access to windows during some pre-defined time.
After this time the user need to do another validation to get more time to work.
I want to protect my program being disabled by the user after he gets authenticated.

Thanks
0
Comment
Question by:jclobocar
6 Comments
 
LVL 26

Accepted Solution

by:
EddieShipman earned 100 total points
ID: 20368867
Well, you could create a screen shot of the desktop and put it in a borderless form and show that form on top of everything then popup a system modal window asking for the login credentials.
0
 
LVL 21

Expert Comment

by:ziolko
ID: 20371941
>>- After logging to Windows XP it must be the first program to run.

that's touhg since some services are starting during system startup

>> I want to protect my program being disabled by the user after he gets authenticated.

this is gonna be easier you can catch WM_CLOSE and return non-zero value but this will prevent only gracefull shutdown user always can run task manager and kill process.

In general the best solution for your problem would be creating your own GINA DLL (just like netware does) but this is hell lot of code

ziolko.
0
 
LVL 1

Author Comment

by:jclobocar
ID: 20372329
Where do I put in the information to start my program?
Is there an way of hidding my process in the task list?
How machines at cyber cafes does something like what I want?
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 26

Expert Comment

by:EddieShipman
ID: 20373419
Most of them write GINAs. There is Delphi GINA code here:
http://knightgina.sourceforge.net/
0
 
LVL 5

Expert Comment

by:Steven-Fernandez
ID: 20476751
If you are the only user in XP you don't get the lock option.

This is a simple trick

Part 1:

Create a shortcut:

View Properties:

Change target to:

%windir%\system32\rundll32.exe user32.dll, LockWorkStation

Place it where ever you want.

Part2:

Add ShellApi to your uses section

 ShellExecute(0,
               nil,
               'c:\thelinkpath\lockit.lnk',
               nil,
               nil,
               SW_SHOWNORMAL);

This will lock the desktop on XP even if the option is not available.

Hope this helps.
0
 
LVL 5

Expert Comment

by:Steven-Fernandez
ID: 20644386
Did you try. I use it myself and it works perfectly.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
Storage devices are generally used to save the data or sometime transfer the data from one computer system to another system. However, sometimes user accidentally erased their important data from the Storage devices. Users have to know how data reco…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, just open a new email message. In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

864 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

Need Help in Real-Time?

Connect with top rated Experts

25 Experts available now in Live!

Get 1:1 Help Now