Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have a .cmd i use to copy our users local files when they change computer. This works very well in XP/2000 but now i can see that we (large enterprise) are moving to Vista. And was wondering if the paths used in my .cmd would work on Vista too...

this is a real cut and paste from the script ("to short down my post" if the full script is needed/wanted i can insert that...) just to show the paths:

robocopy "C:\DOCUME~1\%userid%\Desktop "%dest%\%Process%" /S /E /COPYALL /V /NP /LOG+:"%logfile%" /R:10 /W:15 /TEE
robocopy "C:\DOCUME~1\%userid%\Favorites" "%dest%\%Process%" /S /E /COPYALL /V /NP /NJH /LOG+:"%logfile%" /R:10 /W:15 /TEE
robocopy "C:\DOCUME~1\%userid%\My Documents" "%dest%\%Process%" /S /E /COPYALL /V /NP /NJH /LOG+:"%logfile%" /R:10 /W:15 /TEE
robocopy "C:\DOCUME~1\%userid%\Start Menu" "%dest%\%Process%" /S /E /COPYALL /V /NP /NJH /LOG+:"%logfile%" /R:10 /W:15 /TEE
robocopy "C:\DOCUME~1\%userid%\Application Data\Microsoft\Internet Explorer\Quick Launch" "%dest%\%Process%" /S /E /COPYALL /V /NP /NJH /LOG+:"%logfile%" /R:10 /W:15 /TEE
robocopy "C:\DOCUME~1\%userid%\Local Settings\Application Data\other" "%dest%\%Process%" /S /E /COPYALL /V /NP /NJH /LOG+:"%logfile%" /R:10 /W:15 /TEE
robocopy "C:\DOCUME~1\%userid%\%Process%" "%dest%\%Process%" /S /E /COPYALL /V /NP /NJH /LOG+:"%logfile%" /R:10 /W:15 /TEE
robocopy "C:\DOCUME~1\%userid%\Application Data\Microsoft\Address Book" "%dest%\%Process%" /S /E /COPYALL /V /NP /NJH /LOG+:"%logfile%" /R:10 /W:15 /TEE
robocopy "C:\DOCUME~1\%userid%\Application Data\Microsoft\Outlook" "%dest%\%Process%" /S /E /COPYALL /V /NP /NJH /LOG+:"%logfile%" /R:10 /W:15 /TEE
robocopy "C:\DOCUME~1\%userid%\Application Data\Microsoft\Proof" "%dest%\%Process%" /S /E /COPYALL /V /NP /NJH /LOG+:"%logfile%" /R:10 /W:15 /TEE
robocopy "C:\DOCUME~1\%userid%\Application Data\Microsoft\Signatures" "%dest%\%Process%" /S /E /COPYALL /V /NP /NJH /LOG+:"%logfile%" /R:10 /W:15 /TEE
robocopy "C:\DOCUME~1\%userid%\Local Settings\Application Data\Microsoft\Outlook" "%dest%\%Process%" /S /E /COPYALL /V /NP /NJH /LOG+:"%logfile%" /R:10 /W:15 /TEE

set dest=x:\%userid% and %process% is the part after %userid%

share|improve this question
    
Holy Crap! Ever thought about deploying Roaming profiles, with UPHClean and such so you don' thave to worry about registry locks and always win? –  Jason B Shrout Jun 26 '09 at 22:58
    
I really wish i could, but this is not an option for me. It's a very standarized and controlled environment. –  Frode Eskil Jun 29 '09 at 19:02

2 Answers 2

up vote 0 down vote accepted

You can use the environmental variable %USERPROFILE% to access current user's profile.

And that variable is universal and works on all Windows versions from Win95 to Win7.

On default install of XP it would give you c:\document and settings\username on Vista it would give you c:\users\username

share|improve this answer
    
This is just so obvious. Thank you. –  Frode Eskil Jun 29 '09 at 19:33

If your question is: "Has the structure of the Users folder changed in Vista?" then the answer is: "yes".

Your best bet is to use USMT (The User State Migration Tool)

Our corporation migrated almost 10,000 workstations/users to Vista this way.

share|improve this answer
    
This is something we have a specialized version of that is not suitable for us in our region right now, but were working on it. –  Frode Eskil Jun 29 '09 at 19:35

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.