How to prevent certain WinXP User from installing any program

Hallo Good Experts :)

In my Network, user sometime install the program which not needed or even sometime malicious. I've tried to block Add/Remove program Dialog via Registry, but user can still easily just download a Setup.EXE (for example) from internet and run it - then wholla the computer got TROJAN :(((

How to prevent certain WinXP User from installing any program in Delphi programming ?

Please help me, Thank You
comicboyAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

SaLzCommented:
mosty trojans don't need to be installed with add/remove, its just a exe opened with a bunch of commands..

1) remove or disable the floppy and cd drives..
2) make a program and name it "SERVICES.EXE" so it can't be deleted from task manager, do commands so it will detect certain windows like the download window in IE or FireFox and have your program CLOSE it, like close the "save as" window..
3) stop them from going into "msconfig" and "registry" and having them removing your program from starting with the system.
4) try the simple code for finding a window and closing it, modify to your needs, if anyone got any beef with this post speak up.

==========
procedure TForm1.Button1Click(Sender: TObject);
var
  h: HWND;
begin
  while true do begin
    h := FindWindow('IEFrame',nil);
    if not IsWindow(h) then exit;
    PostMessage(h, WM_CLOSE, 0, 0);
  end;
end
========
function EnumWindowsProc(Wnd: HWND; dummy: integer): BOOL; stdcall;
var
  ClassName: array [0..7] of Char;
begin
  Result := True;
  GetClassname(wnd, ClassName, SizeOf(ClassName));
  if CompareText('IEFrame', ClassName) = 0 then
  begin
  PostMessage(wnd, WM_CLOSE,0,0);
  end;
end;


procedure TForm1.Button1Click(Sender: TObject);
var
i : integer;
begin
EnumWindows(@EnumWindowsProc, i);
end;
=============
procedure TfMain.WMActivate(var Msg: TWMActivate);
var
  S: String;
  wnd: HWND;
  i: Integer;
begin
  if Msg.Active=0 then
     begin
       wnd := Msg.ActiveWindow;
       if wnd = 0 then
          wnd := GetForegroundWindow;
       i := GetWindowTextLength(wnd);
       SetLength(S, i + 1);
       GetWindowText(Wnd, PChar(S), i + 1);

       if Pos('Internet Explorer', S) > 0 then
          PostMessage(wnd, WM_CLOSE, 0, 0);
     end;
end;
======
0
Wim ten BrinkSelf-employed developerCommented:
If you want to prevent users from installing software, restrict their access rights. For example, don't grant them administrative rights but make them normal users.

Then again, to protect those systems against computer virusses and trojans, do whatever everyone else is doing and install an anti-virus product on their systems. For example, Norton Antivirus 2005 is a good one. Kaspersky and MacAfee are good alternatives too. Make sure they cannot disable it, though. And keep them updated all the time.

In Delphi, it means that you have to write your own antivirus software. Not too difficult, if you know what you are doing. Problem is, how to make sure it performs as well as those professional tools. Because your application will be running in the background all the time, monitoring all actions. If it's too intrusive, users will disable it...
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
comicboyAuthor Commented:
So sorry, no answer here actually answer my question which to block user install anything via window registry.

So I vote for delete this question.

Thank You
0
comicboyAuthor Commented:
For Workshop Alex :

I'm already uses Norton AV even before version 2004, but that doesn't stop user from installing anything, well yes they stop virus, but not all, the problem is not cure the virus or trojan but to prevent them from installing is better.

User access needed to be administrator because they need to operate some software which can save their data. If I restrict the access (which in XP only 2 user Admin or limited) to limited user then the software won't work. Can you point me how to setup an account not only just by admin or limited, such as I can set this account cannot  install software BUT can save data.

For Salz :
Better if I can program to set a certain user privilage such as do not let install program rather than detecting and closing well so many programs...
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Delphi

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.