Re: how copy local account's user profile to another with vbscript




"I have a Problem" <IhaveaProblem@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:6F7CC907-6206-4010-AA96-BE85A93C297F@xxxxxxxxxxxxxxxx
> i want a commnet user can use administrator user profile.In GUI,we can follow
> the steps :
> To copy a user profile
> 1.
> Open System in Control Panel.
>
> 2.
> On the Advanced tab, under User Profiles, click Settings.
>
> 3.
> Under Profiles stored on this computer, click the user profile you want to
> copy, and then click Copy To.
>
> 4.
> Do one or more of the following:
>
> To specify where the new profile will be saved
>
> . In Copy profile to, type the location for the new profile, or click Browse
> to select the path.
>
>
> To specify who is permitted to use the copied profile
>
> 1.
> In Permitted to use, click Change.
>
> 2.
> In the Select User or Group dialog box, in Enter the object name to select,
> add the user, group, or built-in security principle or click Object Types to
> select an object type.
>
> To specify a domain to search, in the Select User or Group dialog box, click
> Locations, and then select the domain.
>
> To further narrow your search, in the Select User or Group dialog box, click
> Advanced.
>
> 3.
> Click OK
>
>
> But how can i do with vbscript?anybody can help me ? thank you very much!


Hopefully someone has a full VBScript sample for you, but to get started you
should be able to use the CopyFolder method of the Script Runtime:
http://msdn.microsoft.com/library/en-us/script56/html/jsmthCopyFolder.asp

For the permissions part, try MoveUser.exe from the Windows Server 2003 Resource
Kit tools:

MSH C:\Tmp> moveuser.exe /?

Command Line Syntax:

moveuser <user1> <user2> [/y] [/c:computer] [/k]

Description:

moveuser.exe changes the security of a profile from one user to another.
This allows the account domain to change, and/or the user name to change.

Arguments:

user1 Specifies a user who has a local profile.
user2 Specifies the user who will own user1's profile. This
account must exist.
/y Allow overwrite of existing profile.
/c Specifies the computer to make the changes to.
/k Specifies if user1 is a local user, then the user account
should be kept.

Specify domain users in DOMAIN\USER format. Specify only USER for
local accounts.



.



Relevant Pages

  • Re: ConnectComputer Still not working
    ... Use moveuser.exe to migrate the profile. ... Login locally to the XP Pro client computer and create a new local user ... Logoff and logon to the XP Pro client computer using the local account ... specify only user for local ...
    (microsoft.public.windows.server.sbs)
  • Re: ConnectComputer Still not working
    ... > A. Use moveuser.exe to migrate the profile. ... Login locally to the XP Pro client computer and create a new local ... > account that is a member of the local ... Specify domain users in DOMAIN/user ...
    (microsoft.public.windows.server.sbs)
  • Re: Way to Specify Profile for Outlook ?
    ... NameSpace.Logon has some optional parameters to specify password, UI, & new ... > Dim OutMail As Outlook.MailItem ... > Is there a way within the VB code to specifiy the Outlook profile to use? ...
    (microsoft.public.dotnet.languages.vb)
  • Re: how copy local accounts user profile to another with vbscript
    ... >> To copy a user profile ... >> To specify who is permitted to use the copied profile ... > should be able to use the CopyFolder method of the Script Runtime: ...
    (microsoft.public.windows.server.scripting)
  • RE: default user profile
    ... A new profile gets created because the user is new to the domain. ... the domain with an account w/ the same username. ... For Windows 2000 installations that are upgrades from Windows NT 4.0 ... Click the Change button, select Permitted to use, then specify the ...
    (microsoft.public.windowsxp.security_admin)