|
server
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Logon script
Hi all,
I am creating a logon script in vbs. I want it to delete the hostfile, and then copy one from a share like the NETLOGON. Anyone who can give me an idea how I should do this? Thx "Bert" <B***@discussions.microsoft.com> wrote in message The logon scripts will run as the user logs on, with the user's security news:C60918E8-EA5F-46C8-8BA9-DFC9CB1EAA7A@microsoft.com... > Hi all, > > I am creating a logon script in vbs. > I want it to delete the hostfile, and then copy one from a share like the > NETLOGON. > Anyone who can give me an idea how I should do this? > > Thx context. Unless all your user accounts are in the local Administrators group (or they have permissions to delete the hosts file) this won't work. If you use a computer startup script in Group Policy, then the script will run before any users log on and will run as the local system (similar to Administrator permissions). I haven't done this exactly, but I think it would work as long as the share containing the hosts file allowed access to all computer accounts in your domain. Before you spend a lot of time on a script, just test out the concept with a simple one-line batch script like this: XCopy "\\MyServer\MyShare\hosts" "%WINDIR%\System32\Drivers\etc\hosts" /r /y Make sure you test on different machines with differnet user accounts (non-admins). PS - Are you sure you can't use DNS instead of managing all these local files? |
|||||||||||||||||||||||