macroy Posted August 8, 2007 Posted August 8, 2007 HiI 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?
gunsmokingman Posted August 8, 2007 Posted August 8, 2007 HiI 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? Here are some links to using the runas cmd.Msn Search Results Run AsScripted Example Of RunasRunas Switches
eyeball Posted August 8, 2007 Posted August 8, 2007 (edited) 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 August 8, 2007 by eyeball
IcemanND Posted August 8, 2007 Posted August 8, 2007 If you are doing this via the domain why not do it via a machine startup script instead of a login script?
h1t3ch Posted October 18, 2007 Posted October 18, 2007 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?
IcemanND Posted October 18, 2007 Posted October 18, 2007 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?
h1t3ch Posted October 19, 2007 Posted October 19, 2007 the files actually sit in the netlogon folder where the startup script sits. I've never done a machine startup so I didn't know if we ave to do anything with domain computer permission or not.
IcemanND Posted October 19, 2007 Posted October 19, 2007 If you are logged onto the computer as a user with administrator rights and run the script does it work?
h1t3ch Posted October 19, 2007 Posted October 19, 2007 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.
IcemanND Posted October 19, 2007 Posted October 19, 2007 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.
h1t3ch Posted October 19, 2007 Posted October 19, 2007 That's what I'm trying to do...but the script doesn't seem to be running at startup. Is there anything other than putting the script in the Computer, startup of the GPO that I have to do?
IcemanND Posted October 19, 2007 Posted October 19, 2007 do you have any errors in the event logs in regards to the domain not be reached, gpos timing out etc.?
h1t3ch Posted October 19, 2007 Posted October 19, 2007 (edited) 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 October 19, 2007 by h1t3ch
IcemanND Posted October 19, 2007 Posted October 19, 2007 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 PolicySet Uset Group Policy Mode to what makes sense for your setting, in my case Merge works best.
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now