Re: how copy local account's user profile to another with vbscript
- From: "I have a Problem" <IhaveaProblem@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Sun, 23 Oct 2005 22:51:04 -0700
Marty List,
thank you for help me!
when i use copyfolder to copy administrator profile to anothor,i got a
message "no permit.",but i can do the same action manually. why?
"Marty List" wrote:
>
> "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.
>
>
>
>
.
- References:
- Re: how copy local account's user profile to another with vbscript
- From: Marty List
- Re: how copy local account's user profile to another with vbscript
- Prev by Date: Re: Posting scripts as attachments
- Next by Date: Get out all password data for every user from active directory
- Previous by thread: Re: how copy local account's user profile to another with vbscript
- Next by thread: MSH to list all installed programs?
- Index(es):
Relevant Pages
|