Solved

Registry Hack on Log in

Posted on 2000-03-23
5
255 Views
Last Modified: 2010-04-13
Would it be possible to selectively change 2 registry entries on startup depending upon the user ID.

ie. if userid = x add these entries ....

This would have to be easily centrally managed as it could need configuration for a large number of users.

The environment is Windows 2000 client and server ?
0
Comment
Question by:davebarter
[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
  • 4
5 Comments
 
LVL 2

Expert Comment

by:pschwan
ID: 2650079
Edit the user profiles on the domain controller. If there are large batches, you can do it by groups.  
0
 

Accepted Solution

by:
pfie earned 100 total points
ID: 2650148
I would suggest to run a cmd upon startup containing the line

rundll32 setupapi,InstallHinfSection DefaultInstall 128 <path>\doit.inf

Where doit.inf contains the regkeys to be added or deleted, or whatever you want.

Refer to http://www.inner-smile.com/
for a little tool called inf-tool, creating inf files from reg files e.g. if you are not familiar with inf file structure.

For environments with large numbers of users, i would suggest to work out the idea into a tool that is run automatically upon every startup by creating a key in HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run\Doit[<pathto>\doit.exe]

I implemented the tool to read the numbered inf files to be done from HKLM, and applying the infs from that list that havent be done before for that user and writing the lastdone inf files number to a key in HKCU.

In your case you may implement the tool to read from a list located (and maintained) on the server, if there are inf files to be done for the specific user, and applying these.

In delphi e.g. a function to apply an inffile would look like this:

function ApplyInfToCu(InfFile: String ) : Boolean;
//function ApplyInfToCu
//applies the infile given in InfFile to registry
var
  InfFilePath : string;    //pathname of the inf File
  exitcode    : integer;   //exitcode of the execute command
begin
  result := false;
  try
    Result:=WinExecute ('rundll32.exe setupapi,InstallHinfSection DefaultInstall 128 '+InfFile,0,true,exitcode);
  except
  end;
end; //ApplyInfToCu

Well, reading the textfile (from server) into a stringlist, looking for the username and picking out the infilenames is really simple. :o)
(the username you get with GetEnvString('USERNAME') and if you design the list like an ini file, you may take advantage of the class TiniFile, that pulls you out the values to a key very easily and serves them to you in a structured list).

rgds
Petra
0
 

Expert Comment

by:pfie
ID: 2650154
I guess i should have written this into an answer?

hmm.. sorry, was my first try
0
 

Expert Comment

by:pfie
ID: 2650155
I guess i should have written this into an answer?

hmm.. sorry, was my first try
0
 

Expert Comment

by:pfie
ID: 2650168
I guess i should have written this into an answer?

hmm.. sorry, was my first try

Petra
0

Featured Post

Edgartown IT Case Study

Learn about Edgartown's quest to ensure the safety and security of the entire town's employee and citizen data. Read the case study!

Question has a verified solution.

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

Suggested Solutions

NTFS file system has been developed by Microsoft that is widely used by Windows NT operating system and its advanced versions. It is the mostly used over FAT file system as it provides superior features like reliability, security, storage, efficienc…
This article discusses how to implement server side field validation and display customized error messages to the client.
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…
Attackers love to prey on accounts that have privileges. Reducing privileged accounts and protecting privileged accounts therefore is paramount. Users, groups, and service accounts need to be protected to help protect the entire Active Directory …

749 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