Kaseya Community

My first attempt at a script

  • Hello All,
    I am new to Kaseya(01/08) and I am attempting to write my first script. My goal is to install UPHClean and execute it on a bunch of machines that I am getting registry unload errors on. I know that whatever I am doing wrong has got to be obvious but I just can't figure it out. I receive a 'Failed THEN in step 3'. I hope someone can help. My attempt at this script is as follows. Thanks in advance. Smile

    Script Name: UPH Clean install script
    Script Description: Installs UPH Clean and executes

    IF True
    THEN
    Get Variable
    Parameter 1 : 10
    Parameter 2 :
    Parameter 3 : agentDrv
    OS Type : 0
    Write File
    Parameter 1 : #agentDrv#\UPHClean-Setup.msi
    Parameter 2 : VSASharedFiles\UPHClean-Setup.msi
    OS Type : 0
    Execute File
    Parameter 1 : #agentDrv#\msiexec /i UPHClean-Setup.msi
    Parameter 2 : /q
    Parameter 3 : 2
    OS Type : 0
    ELSE

    Legacy Forum Name: My first attempt at a script,
    Legacy Posted By Username: DeluxCompu
  • DeluxCompu
    #agentDrv#\msiexec /i UPHClean-Setup.msi


    Try this instead:

    msiexec /i #agentDrv#\UPHClean-Setup.msi /qn

    Call the msi from the #agentDrv# folder, not msiexec.

    Legacy Forum Name: Scripts Forum,
    Legacy Posted By Username: RCS-Michael
  • I just tried that and had the same result. Here's the weird part. The file gets written to the correct directory. If I remote into the machine and run the execute it installs. I'm at a loss.

    Legacy Forum Name: Scripts Forum,
    Legacy Posted By Username: DeluxCompu
  • This is what we use in our deploy and install script

    Parameter 1 : %windir%\system32\msiexec.exe
    Parameter 2 : /i #agentDrv#\UPHClean-Setup.msi /qn

    Legacy Forum Name: Scripts Forum,
    Legacy Posted By Username: Dan_Barclay
  • Dan, you are the man Smile That worked like a charm and I actually think I understand why. Thanks for all the help.

    Legacy Forum Name: Scripts Forum,
    Legacy Posted By Username: DeluxCompu