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


Desktop Management

Windows Servers & Security

Other Products




Custom Script: C0025

Windows Script Host deployment

Planning to use Windows Script Host (WSH) to script your applications? Use ScriptLogic to automate the installation without making a trip to each client!


Add these line(s) to your Custom Script:

; ** Install/upgrade Windows Script Host 5.1 to Clients [Begin] **
; will only install to 95 OSR2, 98, NTW4, NTW5 clients if LAN-attached.
if ingroup('Domain Users') and $ConnType='LAN' and $NTtype<>'Server'
  if $OStype='NT' and $OSversion='5.01'
    $Key='{0E8AF1C0-D275-11d2-B803-0000F81E8383}' ; W2K Test Key
  else
    $Key='{2C2738E0-8E3A-11d3-A998-00104B365C9F}' ; NT4 & 9x Test Key
  endif
  if readvalue('$HKLM\Software\Microsoft\Active Setup\Installed Components\$Key','Version')<>'5,1,0,4615'
    $ValidOS=0
    select
      case $OStype='NT' and $OsVersion<>'3.51' ; NT Workstation v4.0 or Windows 2000 Pro
        $ValidOS=1
      case $OStype<>'NT' and $VerboseOS<>'Windows 95 4.00.950' ; 95 OSR2 or 98
        $ValidOS=1
    endselect
  endif
  if $ValidOS
    $result=messagebox('Windows Script Host v5.1 will be installed to your computer. If you are prompted to restart your computer after the installation process finishes, please do so.','Software Installation Notice',4160,0)
    $cmdline='\\ntfile\archive\install.utils-drivers\utils\wsh.51\ste51en.exe -Q'
    shell $cmdline
  endif
endif
; ** Install/upgrade Windows Script Host 5.1 to Clients [End] **

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