ScriptLogic.com: Windows Management…Point, Click, Done


Desktop Management

Windows Servers & Security

Other Products




Custom Script: C0024

Overview:

This custom script will allow you to centrally deploy an updated TCP/IP Hosts file to your clients.


Add these line(s) to your Custom Script:

; ** Distribute updated "Hosts" file to clients [Begin] **
$FileName='hosts'
$SrcPath='\\server\share'
if $OStype='NT'
  $DestPath='$DllDir\drivers\etc'
else ; OS=9x
  $DestPath='%windir%'
endif
$DestFile=$DestPath+'\'+$FileName
$SrcFile=$SrcPath+'\'+$FileName
if comparefiletimes($DestFile,$SrcFile)<0 or 1-exist($DestFile)
  copy $SrcFile $DestPath
endif
; ** Distribute updated "Hosts" file to clients [End] **

Created: 21 November, 1999
Last Revised: 22 July, 2004