?
Solved

copy file to system32 folder of workstations

Posted on 2010-11-24
5
Medium Priority
?
876 Views
Last Modified: 2012-06-27
As part of my server logon script, I want to be able to copy a file from the server to the system32\Drivers\etc folder on the local workstation. My vbs script using filesystemobject copyfile works great as long as the person logs in is an administrator where they have read/write/modify permissions on that folder, but fails for someone with read only permissions. How can I copy this file to the workstation on logon?
0
Comment
Question by:BradleyCleveland
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
5 Comments
 
LVL 42

Expert Comment

by:kevinhsieh
ID: 34207245
Change it from a logon script to a startup script under the machine configuration. The script will run the next time the machine boots.
0
 
LVL 4

Expert Comment

by:shudman
ID: 34209431
You could make use of Group Policy Preferences to copy the file across too. You didn't say whether this was the same file every time, or whether the source changes.
0
 
LVL 1

Author Comment

by:BradleyCleveland
ID: 34210297
The destination file is always the same.  C:\windows\system32\drivers\etc\hosts.
The source file will vary depending on the AD group of the employee logging in.
0
 
LVL 42

Accepted Solution

by:
kevinhsieh earned 2000 total points
ID: 34210344
Either a startup script or GPO file preference will work, but these are MACHINE properties, not employee settings. If you really need to make the hosts file dependent on the user and not the machine, you can use GPO file security to give users modify access to the etc directory, in which case your login script will work.

I am sure that malware and other malicious users would love to have access to the hosts file, so it would be better if users didn't have access to change it.
0
 
LVL 1

Author Closing Comment

by:BradleyCleveland
ID: 34219692
What I am doing is copying restricted copy of the hosts file on machine startup (doesn't matter who logs in). then only if an employee with administrator access logs, I copy the unrestricted hosts file to the machine.  If anyone besides an administratror needs access to the blocked websites, then I will go to that machine, give them permissions on that folder and include them with administrators in my script to copy over the unstricted hosts file.  This plan isn't working as smoothly as I had hoped, but it will suffice for now until I get time to research internet policy software and decide what will work best for our agency
0

Featured Post

Are your AD admin tools letting you down?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

New Windows 7 Installations take days for Windows-Updates to show up and install. This can easily be fixed. I have finally decided to write an article because this seems to get asked several times a day lately. This Article and the Links apply to…
After seeing many questions for JRNL_WRAP_ERROR for replication failure, I thought it would be useful to write this article.
This tutorial will give a short introduction and overview of Backup Exec 2012 and how to navigate and perform basic functions. Click on the Backup Exec button in the upper left corner. From here, are global settings for the application such as conne…
This tutorial will walk an individual through the steps necessary to join and promote the first Windows Server 2012 domain controller into an Active Directory environment running on Windows Server 2008. Determine the location of the FSMO roles by lo…
Suggested Courses

764 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question