Hi all,

I am learning to use VBScript to create a Windows logon script. Right
now, we are in the process of moving from a workgroup to a domain, so
everyone has a local profile on the copmuter with their desktop and
favorites, etc. What I want to do is have it so that when the users
first log on to the domain, it will copy their Desktop and Favorites
from their old profile to the new one (in this case it is C:\Docs and
Settings\Username to C:\Docs and Settings\Username.MYDOMAIN)

Anyway, I thought I had this all nice and good as it worked fine when I
tried logging in. When I tried logging in as a different user, however,
I get a path cannot be found when I try to grab a folder object (ie
objFSO.GetFolder(strSource)).

The only thing I can think of is that maybe this is some type of
permissions problem? I think this because when I tried to open up
C:\Docs and Settings\Username when the user was logged on I get an
"Access is Denied Error." I, on the other hand, am an admin/domain
admin and have no problem getting to other profiles on this computer.

I tried making the user a local admin, but I still got the same problem
in the script and still am unable to open C:\Docs and
Settings\Username.

Any ideas?

Thanks for the advice!

Re: Copying folders by ganesh

ganesh
Thu Sep 14 21:09:57 CDT 2006

When a user is logged on, the NTUSER.DAT for that user is in use. This
file contains the HKCU registry hive for the user. So, there is no way
to copy the file to a different location.

Are you logging in as the workgroup user or domain user? If you are
logging in as workgroup user, you will not be able to copy the folders
to the Username.Domain folder. You will need to do this using another
account that has admin access with the workgroup user logged off.

hope this helps
ganesh

ihatecrappymail@yahoo.com wrote:
> Hi all,
>
> I am learning to use VBScript to create a Windows logon script. Right
> now, we are in the process of moving from a workgroup to a domain, so
> everyone has a local profile on the copmuter with their desktop and
> favorites, etc. What I want to do is have it so that when the users
> first log on to the domain, it will copy their Desktop and Favorites
> from their old profile to the new one (in this case it is C:\Docs and
> Settings\Username to C:\Docs and Settings\Username.MYDOMAIN)
>
> Anyway, I thought I had this all nice and good as it worked fine when I
> tried logging in. When I tried logging in as a different user, however,
> I get a path cannot be found when I try to grab a folder object (ie
> objFSO.GetFolder(strSource)).
>
> The only thing I can think of is that maybe this is some type of
> permissions problem? I think this because when I tried to open up
> C:\Docs and Settings\Username when the user was logged on I get an
> "Access is Denied Error." I, on the other hand, am an admin/domain
> admin and have no problem getting to other profiles on this computer.
>
> I tried making the user a local admin, but I still got the same problem
> in the script and still am unable to open C:\Docs and
> Settings\Username.
>
> Any ideas?
>
> Thanks for the advice!


Re: Copying folders by ihatecrappymail

ihatecrappymail
Fri Sep 15 07:29:19 CDT 2006

Thanks for the reply. I am logged on to the domain under both
circumstances. Like I said, it works for me (I am a local admin and a
domain admin), but not for the other user who is a local admin, but
just a Domain User.

So, is there any other way I can copy the existing profile, so I don't
have to go to each user's computer and copy them by hand?

Thanks!


ganesh wrote:
> When a user is logged on, the NTUSER.DAT for that user is in use. This
> file contains the HKCU registry hive for the user. So, there is no way
> to copy the file to a different location.
>
> Are you logging in as the workgroup user or domain user? If you are
> logging in as workgroup user, you will not be able to copy the folders
> to the Username.Domain folder. You will need to do this using another
> account that has admin access with the workgroup user logged off.
>
> hope this helps
> ganesh
>
> ihatecrappymail@yahoo.com wrote:
> > Hi all,
> >
> > I am learning to use VBScript to create a Windows logon script. Right
> > now, we are in the process of moving from a workgroup to a domain, so
> > everyone has a local profile on the copmuter with their desktop and
> > favorites, etc. What I want to do is have it so that when the users
> > first log on to the domain, it will copy their Desktop and Favorites
> > from their old profile to the new one (in this case it is C:\Docs and
> > Settings\Username to C:\Docs and Settings\Username.MYDOMAIN)
> >
> > Anyway, I thought I had this all nice and good as it worked fine when I
> > tried logging in. When I tried logging in as a different user, however,
> > I get a path cannot be found when I try to grab a folder object (ie
> > objFSO.GetFolder(strSource)).
> >
> > The only thing I can think of is that maybe this is some type of
> > permissions problem? I think this because when I tried to open up
> > C:\Docs and Settings\Username when the user was logged on I get an
> > "Access is Denied Error." I, on the other hand, am an admin/domain
> > admin and have no problem getting to other profiles on this computer.
> >
> > I tried making the user a local admin, but I still got the same problem
> > in the script and still am unable to open C:\Docs and
> > Settings\Username.
> >
> > Any ideas?
> >
> > Thanks for the advice!