Hallo Jan,
das habe ich gemacht, hat aber leider auch nicht funktioniert. Jetzt passiert das folgende:
Code: Alles auswählen
(1394) [5] [2024-12-11 10:17:13.661] [wh-test] Execution of: Files_CreateUserFiles /AllUserProfiles
(1396) [7] [2024-12-11 10:17:13.668] [wh-test] Registry started without redirection (64 Bit)
(1397) [7] [2024-12-11 10:17:13.669] [wh-test] Registry started readonly
(1398) [7] [2024-12-11 10:17:13.669] [wh-test] Registry started without redirection (64 Bit)
(1399) [6] [2024-12-11 10:17:13.669] [wh-test] Registry key [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList\S-1-5-18] opened
(1400) [6] [2024-12-11 10:17:13.669] [wh-test] Key closed
(1401) [7] [2024-12-11 10:17:13.669] [wh-test] Registry started readonly
(1402) [7] [2024-12-11 10:17:13.669] [wh-test] Registry started without redirection (64 Bit)
(1403) [6] [2024-12-11 10:17:13.669] [wh-test] Registry key [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList\S-1-5-19] opened
(1404) [6] [2024-12-11 10:17:13.670] [wh-test] Key closed
(1405) [7] [2024-12-11 10:17:13.670] [wh-test] Registry started readonly
(1406) [7] [2024-12-11 10:17:13.670] [wh-test] Registry started without redirection (64 Bit)
(1407) [6] [2024-12-11 10:17:13.670] [wh-test] Registry key [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList\S-1-5-20] opened
(1408) [6] [2024-12-11 10:17:13.671] [wh-test] Key closed
(1409) [7] [2024-12-11 10:17:13.671] [wh-test] Registry started readonly
(1410) [7] [2024-12-11 10:17:13.671] [wh-test] Registry started without redirection (64 Bit)
(1411) [6] [2024-12-11 10:17:13.671] [wh-test] Registry key [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList\S-1-5-21-...] opened
(1412) [6] [2024-12-11 10:17:13.671] [wh-test] Key closed
(1413) [7] [2024-12-11 10:17:13.671] [wh-test] Registry started readonly
(1414) [7] [2024-12-11 10:17:13.671] [wh-test] Registry started without redirection (64 Bit)
(1415) [6] [2024-12-11 10:17:13.671] [wh-test] Registry key [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList\S-1-5-21-...] opened
(1416) [6] [2024-12-11 10:17:13.671] [wh-test] Key closed
(1417) [6] [2024-12-11 10:17:13.671] [wh-test] Make it for user directory: C:\Users\AAAAAAAAA\
(1422) [7] [2024-12-11 10:17:13.671] [wh-test] copy "s:\wh-test\test.txt" "C:\Windows\System32\config\systemprofile\AppData\local\TestScript\"
(1423) [7] [2024-12-11 10:17:13.671] [wh-test] copy
(1425) [6] [2024-12-11 10:17:13.672] [wh-test] path C:\Windows\System32\config\systemprofile\AppData\local\TestScript\ created
(1428) [6] [2024-12-11 10:17:13.686] [wh-test] Copying s:\wh-test\test.txt -----> C:\Windows\System32\config\systemprofile\AppData\local\TestScript\
(1429) [6] [2024-12-11 10:17:13.686] [wh-test] 1 File(s) found
(1432) [7] [2024-12-11 10:17:13.692] [wh-test] Source s:\wh-test\test.txt
(1434) [6] [2024-12-11 10:17:13.718] [wh-test] copy: s:\wh-test\test.txt copied to C:\Windows\System32\config\systemprofile\AppData\local\TestScript\
(1435) [6] [2024-12-11 10:17:13.719] [wh-test] 1 File(s) treated
(1436) [6] [2024-12-11 10:17:13.728] [wh-test] Make it for user directory: C:\Users\BBBBBBB\
(1441) [7] [2024-12-11 10:17:13.728] [wh-test] copy "s:\wh-test\test.txt" "C:\Windows\System32\config\systemprofile\AppData\local\TestScript\"
(1442) [7] [2024-12-11 10:17:13.728] [wh-test] copy
(1446) [6] [2024-12-11 10:17:13.729] [wh-test] Copying s:\wh-test\test.txt -----> C:\Windows\System32\config\systemprofile\AppData\local\TestScript\
(1447) [6] [2024-12-11 10:17:13.729] [wh-test] 1 File(s) found
(1450) [7] [2024-12-11 10:17:13.733] [wh-test] Source s:\wh-test\test.txt
(1451) [7] [2024-12-11 10:17:13.733] [wh-test] Info: Target C:\Windows\System32\config\systemprofile\AppData\local\TestScript\test.txt exists and shall be overwritten
(1453) [6] [2024-12-11 10:17:13.745] [wh-test] copy: s:\wh-test\test.txt copied to C:\Windows\System32\config\systemprofile\AppData\local\TestScript\
(1454) [6] [2024-12-11 10:17:13.746] [wh-test] 1 File(s) treated
(1455) [6] [2024-12-11 10:17:13.755] [wh-test] Make it for user directory: C:\Users\Default\
(1460) [7] [2024-12-11 10:17:13.755] [wh-test] copy "s:\wh-test\test.txt" "C:\Windows\System32\config\systemprofile\AppData\local\TestScript\"
(1461) [7] [2024-12-11 10:17:13.755] [wh-test] copy
(1465) [6] [2024-12-11 10:17:13.756] [wh-test] Copying s:\wh-test\test.txt -----> C:\Windows\System32\config\systemprofile\AppData\local\TestScript\
(1466) [6] [2024-12-11 10:17:13.756] [wh-test] 1 File(s) found
(1469) [7] [2024-12-11 10:17:13.758] [wh-test] Source s:\wh-test\test.txt
(1470) [7] [2024-12-11 10:17:13.758] [wh-test] Info: Target C:\Windows\System32\config\systemprofile\AppData\local\TestScript\test.txt exists and shall be overwritten
(1472) [6] [2024-12-11 10:17:13.770] [wh-test] copy: s:\wh-test\test.txt copied to C:\Windows\System32\config\systemprofile\AppData\local\TestScript\
(1473) [6] [2024-12-11 10:17:13.772] [wh-test] 1 File(s) treated
(1474) [5] [2024-12-11 10:17:13.777] [wh-test] Finished section: Files_CreateUserFiles /AllUserProfiles
Ergibt für mich auch in sofern Sinn, da opsi mit dem Benutzer System läuft.
Allerdings habe ich eine Lösung gefunden. Wenn ich die Files Sektion wie folgt ändere, funktioniert es:
Code: Alles auswählen
[Files_CreateUserFiles]
copy "%ScriptPath%\test.txt" "%CurrentProfileDir%\AppData\local\TestScript\"
Das ist nicht perfekt, aber es reicht mir erstmal. Ggf. findet Ihr ja noch eine Lösung dafür.
Grüße, Torsten