Aug 1, 2006 #1 dustbuster Programmer Joined Dec 19, 2002 Messages 95 How can I create a new (local)limited user account in Windows XP Pro using scripting? User: User1 Password: user1pass
How can I create a new (local)limited user account in Windows XP Pro using scripting? User: User1 Password: user1pass
Aug 1, 2006 #2 markdmac MIS Joined Dec 20, 2003 Messages 12,340 Location US Is this a Domain or Workgroup environment? I hope you find this post helpful. Regards, Mark Check out my scripting solutions at http://www.thespidersparlor.com/vbscript Upvote 0 Downvote
Is this a Domain or Workgroup environment? I hope you find this post helpful. Regards, Mark Check out my scripting solutions at http://www.thespidersparlor.com/vbscript
Aug 2, 2006 Thread starter #3 dustbuster Programmer Joined Dec 19, 2002 Messages 95 This is a workgroup environment. Thanks, Upvote 0 Downvote
Aug 2, 2006 #4 markdmac MIS Joined Dec 20, 2003 Messages 12,340 Location US You will be faced with the challenge of needing admin credentials on each of the workgroup PCs. The code to create the account is simple: Code: strComputer = "atl-ws-01" Set colAccounts = GetObject("WinNT://" & strComputer & "") Set objUser = colAccounts.Create("user", "Admin2") objUser.SetPassword "09iu%4et" objUser.SetInfo Once you have the account you can add the user to the Admins group using the command NET LOCALGROUP The syntax of this command is: NET LOCALGROUP [groupname [/COMMENT:"text"]] [/DOMAIN] groupname {/ADD [/COMMENT:"text"] | /DELETE} [/DOMAIN] groupname name [...] {/ADD | /DELETE} [/DOMAIN] I hope you find this post helpful. Regards, Mark Check out my scripting solutions at http://www.thespidersparlor.com/vbscript Upvote 0 Downvote
You will be faced with the challenge of needing admin credentials on each of the workgroup PCs. The code to create the account is simple: Code: strComputer = "atl-ws-01" Set colAccounts = GetObject("WinNT://" & strComputer & "") Set objUser = colAccounts.Create("user", "Admin2") objUser.SetPassword "09iu%4et" objUser.SetInfo Once you have the account you can add the user to the Admins group using the command NET LOCALGROUP The syntax of this command is: NET LOCALGROUP [groupname [/COMMENT:"text"]] [/DOMAIN] groupname {/ADD [/COMMENT:"text"] | /DELETE} [/DOMAIN] groupname name [...] {/ADD | /DELETE} [/DOMAIN] I hope you find this post helpful. Regards, Mark Check out my scripting solutions at http://www.thespidersparlor.com/vbscript
Aug 3, 2006 Thread starter #5 dustbuster Programmer Joined Dec 19, 2002 Messages 95 In the code above strComputer is the name of the current machine, right? And the code is creating the user "Admin2"? Upvote 0 Downvote
In the code above strComputer is the name of the current machine, right? And the code is creating the user "Admin2"?