L
L
LMA7092020-03-03 08:52:33
Automation
LMA709, 2020-03-03 08:52:33

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

2 answer(s)
A
Alexey Dmitriev, 2020-03-03
@SignFinder

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.

D
Dmitry Shumov, 2020-03-03
@dshumov

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 question

Ask a Question

731 491 924 answers to any question