Jump to content

Copy to system32 for restricted user with loginscript.


Recommended Posts

Hi

I would like to copy oeminfo.ini and oemlogo.bmp files with companty information to all computers with help with the login script.

But it don't work with restricted user. Access denied,files are in use.....

Is it posible to call on a bat script to to this or even possible to do it right in the loginscript. Tried with xcopy, robocopy, fso.CopyFile etc... but with no luck so far.

Any one got a ide how to get around this problem?

:rolleyes:

Link to comment
Share on other sites


Hi

I would like to copy oeminfo.ini and oemlogo.bmp files with companty information to all computers with help with the login script.

But it don't work with restricted user. Access denied,files are in use.....

Is it posible to call on a bat script to to this or even possible to do it right in the loginscript. Tried with xcopy, robocopy, fso.CopyFile etc... but with no luck so far.

Any one got a ide how to get around this problem?

:rolleyes:

Here are some links to using the runas cmd.

Msn Search Results Run As

Scripted Example Of Runas

Runas Switches

Link to comment
Share on other sites

yeah but (sorry to oppose you here GSM ;)) using the runas command means the password is in plain text.

what i think he really needs is a vb script that scans the network for hosts and if they exist copy the files to \\hostname\c$\windows\system32

that way he can just run it from a server with admin rights

:)

Edited by eyeball
Link to comment
Share on other sites

  • 2 months later...

I've been trying this method, but I can't get the script to run. I have a script that copies some .ini files to the system folder and a couple of executables to the C: drive. Is there any groups that I need to add before the script will run and copy? I add the domain computer to the c: directory is that correct?

Link to comment
Share on other sites

shouldn't need to add the doamin computer at all if you are running this as a startup script it runs under the system context. Are there any permission restrictions on the folder you are copying the files from?

Link to comment
Share on other sites

My user's are restricted users, my script runs at login for users but can't copy files to the sys folder or C:\, I decided to to run it at startup for the machine instead. Looking at the security rights on the netlogon folder, there is Auth User & Domain User, I didn't know if I had to add domain computers rights to this folder also for the script to run and copy to the machine at startup.

Link to comment
Share on other sites

Restricted users cannot copy into the windows directory. which is why your script is not working. you either need to give them more rights, or run the script as a machine startup script which has runs under the system context.

Link to comment
Share on other sites

I finally got it to work, but it seems like it only runs when the initial profile of the user is created. Once created the startup script doesn't run, Is this correct? I tested by deleting the test profile, logged in under with the test credentials and watch the startup script run during the initial creation of the profile, logged out and back in and it didn't run again. I have executables that are being used by other software and on a daily basis they are being manipulated/changed so having this script run at reboot regardless if the profile is there or not is a must. Is it a GPO setting? Thanks for the continued help, very much appreciated

Edited by h1t3ch
Link to comment
Share on other sites

I've never seen that problem. The only thing I can think of is to turn on 'User Group Policy loopback processing mode' for the GPO.

In your GPO look under Computer Configuration -> Administrative Templates -> System -> Group Policy

Set Uset Group Policy Mode to what makes sense for your setting, in my case Merge works best.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...