Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Delphi to create new account window user

Status
Not open for further replies.

GreenDelphi

Programmer
Apr 11, 2010
7
0
0
Hi

I have a question to ask, is it possible to create a new account user on windows (admin or user) using Delphi? Other than that i am looking at changing the registry that allows the user to add new user on the system.

Thank you =)
 
Your question has a familiar tone to it... Why do you want to do this?

Roo
Delphi Rules!
 
Hi roo0047
I think you have more interested in why am i doing this rather than sharing and exchanging of ideas. I thought forums are for exchanging ideas and sharing of Delphi codes?
 
Sometimes knowing the why allows us to give you better suggestions.
 
Hi
True, i agree with you DjangMan. Anyway i am trying to create a new user when the user runs my application to give the user a "Feel of a own application".

I understand this can be done by adding the user thru the control panel. So i was thinking was it possible to do it in Delphi but i did some research and i think its might be a little hard to be implemented.

Any suggestions?
 
"Feel of a own application"

The user that will run your application already has his own user account.

Not very convincing...

/Daddy



-----------------------------------------------------
What You See Is What You Get
Never underestimate tha powah of tha google!
 
My guess is that you'll run up against UAC. Being able to create new accounts on a computer could be a big issue when thinking about security.

That aside - I'm afraid that is beyond what I can help with...
 
Hi Whosrdaddy,
"Feel of own application" i meant, when the user runs the application..the user knows that it is running his own account or settings. That was i meant of a feel of the user own application. Sorry if i din't make things clear enough.

Hi DjangMan,
So you mean Window UAC will disallow me to create a new user similar to the one in Windows -> add user account using Delphi?

How about is their any Delphi API which i can create that allows the user to add/remove user in my application? So it would some how feels like something in Windows?

Thank you for sharing your knowledge. Thanks

 
Perhaps you are looking for a Delphi program that is able to create/store user setting/remove user from your application.
 
Its quite simple to create an application that requires users to 'log in to it' when it runs, and then maintaining a list of 'users'.
Each of the applications 'users settings' can be stored either as a file or in the registry.
You don't have to dynamically create windows user accounts to do that.

Is that what you want to do?

There have been some instances of new members attempting to gain knowledge about hacking windows in this forum, so we are being careful.

Steve: N.M.N.F.
If something is popular, it must be wrong: Mark Twain
 
Hi sggaunt,

Thanks for you reply. What you described sounds good, as i would like to personalized my application such that when it launches my application, it will displayed a different user perhaps "USER2" which it will load the user2 settings.

I do not wish to stored/write the USER2 settings on the registry as it will like my application to be run on user mode. Therefore saving the settings in a file is a better idea.

Yup. I understand where are u coming from, that new members here is to gain knowledge for their own evil intension.

However for me, I would only like to learn how can I personalized my application such that it can have a new user mode when my application is being launched by the default user.

Regards and Thanks for you replies
 
You could show the user a login screen or use their windows log in account name. Store the user's settings in their own .ini file or in a .xml file or a database like an Access database.
 
I would only like to learn how can I personalized my application such that it can have a new user mode when my application is being launched by the default user.

I still do think this is a bad concept (and bad design).
Using a "default" user is not a good security practice.
Windows already has the concept of "users", no need to duplicate this concept.

my 2 $c...

/Daddy



-----------------------------------------------------
What You See Is What You Get
Never underestimate tha powah of tha google!
 
Store the user's settings in their own .ini file or in a .xml file or a database like an Access database.

Speaking of .xml files, TClientDataSet could also be an option. Consider the following three possible fields:

1.) Username. Either the user's name is in the TClientDataSet or it isn't. Attempt to filter the table based on the user's name. If the user's name is not in the table, resort to the 'default' appearance of your program, otherwise use the resulting records to store visible VCL related details.

2.) Visible_VCL_ID. A simple integer value specifying which visible VCL to modify. For example, 1 could be the font style of a particular TEdit (or all the TEdits), 2 could be the background image of the TForm, etc...

3.) Visible_VCL_Ctrl_Data. To whatever the actual visible VCL is supposed to be modified. For example (using the example in 2.) above), "Arial", "Dog.jpg", etc...

...just an idea. I have three particular tables in our local database server set up much like this and I use (sometimes abuse) the three tables in a number of different ways.

Steve.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top