Seite 2 von 2

Re: Opsi Script unterbrechen - Benutzerbibliotheken verschieben

Verfasst: 08 Jun 2019, 00:23
von Kay96
@SisterOfMercy "Benutzerbibliotheken" are the User folders like pictures, music, documents. The path is C:\Users\[username]\xxx.
The Problem on this topic is that the folder C:\Users\[username]\... is created after the first login of the user.
These are the steps of my script:
- create the user with a powershellcall
- set the registry keys to Change the paths of the user directory
- set the autologin in registry for the user
- set runonce restart
- reboot the maschine
- after reboot logout opsi
- the user do a automatic login
- the User reboots (runonce) -> user directories are created
- make a robocopy of the directorys from C:\Users\[username]\xxx-> D:\

Re: Opsi Script unterbrechen - Benutzerbibliotheken verschieben

Verfasst: 09 Jun 2019, 01:13
von SisterOfMercy
Huh?

I have been using this for at least five years:

Code: Alles auswählen

[Registry_install_homedrive_gce]
openkey [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders]
set "Desktop" = REG_EXPAND_SZ:"K:\Desktop"
set "Personal" = REG_EXPAND_SZ:"K:\My Documents"
The computer is rebooted after this script (because this package also does a lot of other things), it worked for XP (64 bits), w7 and w10.
Of course the profile is in the same location, and does not roam. Desktop and Documents are on the server, and therefore backed up.
This thing still works, also for new users.

It seems to me like you want to move both those directories _and_ the user profile, right?