Author Topic: Create a new user profile  (Read 152 times)

seckner

  • Jr. Member
  • **
  • Posts: 57
Create a new user profile
« on: September 05, 2017, 09:41:15 am »
I'm not thinking this through correctly: I want to create a new user profile on a computer. Computer name = work1, user name is Scott. Scott has never logged into work1. I know there is already a way to create the c:\users\scott account on computer work1, I simply can't see the way. A not so gentle shove in the right direction would be appreciated!   

td

  • Tech Support
  • *****
  • Posts: 2159
    • WinBatch
Re: Create a new user profile
« Reply #1 on: September 05, 2017, 10:00:23 am »
You might find the following  useful:

http://forum.winbatch.com/index.php?topic=1891.0

Are you trying to write a script or are you looking for general Windows help?  Which version of Windows are you targeting?   Are you attempting to create a local account or a Windows Network account?  Have you searched the Tech Database for examples - there are serveral - ?
"Success is a lousy teacher. It seduces smart people into thinking they can't lose."
  - Bill Gates


seckner

  • Jr. Member
  • **
  • Posts: 57
Re: Create a new user profile
« Reply #2 on: September 05, 2017, 11:35:30 am »
I'm sorry Tony, I told ya I wasn't right today. Scripting solution for Windows 10 clients. I'm trying to create a new user account on the computer. I have 70 new computers for my staff so I want to add their user account to their laptops without having to physically log into each one. I hope that makes sense..

td

  • Tech Support
  • *****
  • Posts: 2159
    • WinBatch
Re: Create a new user profile
« Reply #3 on: September 05, 2017, 01:29:33 pm »
This Tech Database article illustrates creating a user:

http://techsupt.winbatch.com/webcgi/webbatch.exe?techsupt/nftechsupt.web+WinBatch/Networks~-~Servers/Microsoft~Client/wNT+Adding~Users~and~Setting~Flags.txt

The user's profile will not be created until the user logs in interactively.  If you want one created before hand for some reason, this article shows a rough approximation of how that might be done:

http://techsupt.winbatch.com/webcgi/webbatch.exe?techsupt/nftechsupt.web+WinBatch/Miscellaneous+Create~User~Profile.txt

Note that you would need to get the new user's token which the above article does not illustrate.

I haven't tried either script on Windows 10 but don't know  of any reason that they will not work given proper process security elevation.
"Success is a lousy teacher. It seduces smart people into thinking they can't lose."
  - Bill Gates


td

  • Tech Support
  • *****
  • Posts: 2159
    • WinBatch
Re: Create a new user profile
« Reply #4 on: September 07, 2017, 07:40:05 am »
A couple of additional comments regarding Windows 10 user accounts.

The Network Extender's wntUserAdd function works just fine to create regular local user accounts.  However, if for some unknown reason you want to create a "Microsoft Account" on the local system, things get a little trickier.  A local account is made a MSFT account by adding about three registry settings in an area of the registry that is off limits to even local administrators.  It is possible to make the required changes but you would need to create the correct binary values and run the script as "System".  MSFT makes this hard because they do not want MSFT Accounts to be created programmatically. After all, they know best how you should manage "your" computer system...   

If you happen to be using Windows 10 Enterprise and need to create an "Azure" user account,  you will likely need to use the ADSI Extender to create it.  As far as I can tell, Azure accounts are not substantially different than an account on any privately maintained Active Directory Windows Network.
"Success is a lousy teacher. It seduces smart people into thinking they can't lose."
  - Bill Gates