[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

Registry Hack on Log in

Posted on 2000-03-23
5
Medium Priority
?
259 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 400 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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

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…
Working from home is a dream for many people who aren’t happy about getting up early, going to the office, and spending long hours at work. There are lots of benefits of remote work for employees.
In response to a need for security and privacy, and to continue fostering an environment members can turn to for support, solutions, and education, Experts Exchange has created anonymous question capabilities. This new feature is available to our Pr…
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …

650 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