Solved

Registry Hack on Log in

Posted on 2000-03-23
5
257 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

Comparison of Amazon Drive, Google Drive, OneDrive

What is Best for Backup: Amazon Drive, Google Drive or MS OneDrive? In this free whitepaper we look at their performance, pricing, and platform availability to help you decide which cloud drive is right for your situation. Download and read the results of our testing for free!

Question has a verified solution.

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

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…
In this blog we highlight approaches to managed security as a service.  We also look into ConnectWise’s value in aiding MSPs’ security management and indicate why critical alerting is a necessary integration.
In this video, viewers are given an introduction to using the Windows 10 Snipping Tool, how to quickly locate it when it's needed and also how make it always available with a single click of a mouse button, by pinning it to the Desktop Task Bar. Int…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…

717 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