Opsi Script unterbrechen - Benutzerbibliotheken verschieben

Beiträge: 50
Registriert: 06 Dez 2018, 09:23

Re: Opsi Script unterbrechen - Benutzerbibliotheken verschieben

Beitragvon Kay96 » 08 Jun 2019, 00:23

@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:\

Beiträge: 1023
Registriert: 22 Jun 2012, 19:18

Re: Opsi Script unterbrechen - Benutzerbibliotheken verschieben

Beitragvon SisterOfMercy » 09 Jun 2019, 01:13


I have been using this for at least five years:

Code: Alles auswählen

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?
Bitte schreiben Sie Deutsch, when I'm responding in the German-speaking part of the forum!