Answer the question
In order to leave comments, you need to log in
How to configure automatic copying of files at system startup via GPO?
I need to make sure that when the end user system starts, the 1C database configuration file is copied to app data .
Did already execution of the program at system start. That is, he launched a bat file that contained the simplest xcopy. - does not work.
I did the launch of this script at system startup. Computer Configuration\Policies\Windows Configuration\Startup Scripts\Startup. - does not work!
I copied the same to the user configuration. Everything is clear.
Yesterday I looked at why the batch file is not being executed. - access denied.
BUT! A folder on a network drive has full access to everyone! Through the conductor and Total, everything is copied.
Please, is there any other way?
Answer the question
In order to leave comments, you need to log in
Computer Configuration\Policies\Windows Configuration\Startup Scripts\Startup - Runs as a computer account. It doesn't know anything about users, their variables, and so on. - because it starts before the user logs on to the computer.
Try something like this:
$path = "$env:userprofile\AppData\Roaming\1C"
#if (Test-Path $path) {
# Write-Host "Файл существует"
# exit
#} else {
Copy-Item \\vsdc01\NETLOGON\1C –destination $env:userprofile\AppData\Roaming\ -recurse -container
#}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question