Announcement

Collapse
No announcement yet.

Scripting App Deployment

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Scripting App Deployment

    I hope there's some coders out there!

    I found a nice script to install the latest Java Runtime 11, but it needs to be run locally.

    What I'd like is for this vb script to read a text file with the PC names requiring the update and run through it, with error handling so if a PC is unresponsive, it won't stop.

    I'm getting sporadic results using psexec and calling cscript. Does anybody have some tools to accomplish this mass deployment?

    [code]
    ' Script to install the J2SE Runtime Environment version 5.0 Update 11.
    ' Sets the preferences after installation to hide the systray icon when Java
    ' is running, and disables autoupdates. Does not uninstall earlier versions
    ' of the JRE.

    Option Explicit

    dim objReg, objWshShell
    dim strComputer, strKeyPath1, strKeyPath2, strValueName1, strValueName2
    dim dblDWordZero, dblDWordOne

    const HKEY_LOCAL_MACHINE = &H80000002

    ' set the key variables
    strKeyPath1 = "SOFTWARE\JavaSoft\Java Update\Policy"
    strKeyPath2 = "SOFTWARE\JavaSoft\Java Plug-in\1.5.0_11"

    ' set the value name variables
    strValueName1 = "EnableJavaUpdate"
    strValueName2 = "HideSystemTrayIcon"


    ' set the value variables
    dblDWordZero = 00000000
    dblDWordOne = 00000001
    strComputer = "."

    Set objWshShell = WScript.CreateObject("WScript.Shell")
    Set objReg=GetObject("winmgmts:{impersonationLevel=imp ersonate}!\"&_
    strComputer & "\root\default:StdRegProv")

    objWshShell.Run "\\path\to]server\jre-1_5_0_11-windows-i586-p-s.exe /s /v""/qn IEXPLORER=1 MOZILLA=1 REBOOT=ReallySuppress JAVAUPDATE=0""", 1, True

    ' Set the values
    objReg.SetDWORDValue HKEY_LOCAL_MACHINE,strKeyPath1,strValueName1,dblDW ordZero
    objReg.SetDWORDValue HKEY_LOCAL_MACHINE,strKeyPath2,strValueName2,dblDW ordOne
    WScript.Quit
    /code]

    Found it here; http://www.appdeploy.com/packages/detail.asp?id=38

    Any ideas?
Working...
X