Q8Y
Q8Y

Reputation: 4001

Adding user to a registry file & give it a permission using the command line or through C#?

How can I add a new user in the registry & give it a permission to read or write for a specific file in the registry, using the command line...

Thanks..

Edited:

Or in C#, Which one can I do it easily, its fine with me... Since, the registry will be created & then the permission should be given during the c# code... All this I need it during coding....

for that reason, I just need a way to do that easily either by using the command line(calling it through C#) or from the C# it self...

I hope everything now clear ;)

Upvotes: 0

Views: 2067

Answers (2)

Gabe
Gabe

Reputation: 86718

Are you asking how to create a Windows user account? If so, you would use the NetUserAdd function or the NET USER command from the command line.

If you need any more information, you'll have to be more specific.

Upvotes: 1

aviv
aviv

Reputation: 2809

You can create a .reg file which holds registry information and just execute it from the command line or double click it.

But you will have to build a long long file with a lot of information in order to add a user to the OS.

Upvotes: 0

Related Questions