Question Locked

Login Script - Copy files for restricted user

0 helpful
11 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

I have files that need to be deployed to the Program Files directory. However, normally the users on the network do not have access privileges to the directory in order to copy the file.

Other than a group policy on startup of the computer (since most users don't reboot normally, but they do logout) how can I get the files copied even if the user doesn't have access?

11 replies

by thomas.deliduka

I read somewhere login scripts run as Administrator. however, when viewing the script run, I get "access denied" when trying to copy the file. If I run it manually as administrator (the script) it copies the file just fine.

So, it's either not running as administrator or there's some weird permissions problem.

by rob miners

Run this from the file server. You will need 2 files. The path will have to be modified. The first one is the .bat the

second is a text file with a list of workstations that you need to add to.

File 1 = copyto.bat

FOR /F " tokens=1 " %%i in (d8.txt) do copy C:\test\*.* "%%i\C$\Program Files\CA"

Put your files that you want copied into a folder EG: c:\test

File 2 = d8.txt

\\ws01.minero.local
\\ws02.minero.local

by chetato

Can you explain to me what is that needs to go in the second file?? these seem like shares, is it where the files that I want to copy is in?

by rob miners

File 2 = d8.txt contains a list of the workstations that you are copying the files to.

\\ws01.minero.local
\\ws02.minero.local

do copy C:\test\*.* is where you are copying the files from.

by thomas.deliduka

Not sure what you mean. I implemented a version of the
batch file to copy the file I wanted.

I am finding, however, that sometimes my group policies are
applying though but that's a whole different issue.

by rob miners

Did the information that i gave you to use copy the files that were required to the PC's?

by thomas.deliduka

yes, it was. Sorry I didn't realize there was a button to mark
things as helpful. I have done that.

This discussion is closed to new replies.