Kaseya Community

Is what I'm trying to achieve possible? License key with Windows installer.

  • Spent awhile trawling Kaseya online help, KB, forums, Google and raised a support ticket. But can't find what I'm sure is a simple answer to my problem.

    I have no experience with scripting and usually only deploy a single .msi file with a \q switch, nice and easy. But now I'm trying to roll out Adobe Pro 9, which requires a license key. Google had some info regarding Orca to edit in a key with the MSI but that confused me. I found some other info regarding PIDKEY, and tried...

    Script Name: Adobe pidkey test
    Script Description: Adobe pidkey test

    IF User Is Logged In
    Parameter 1 :
    THEN
    Get Variable
    Parameter 1 : 4
    Parameter 2 :
    Parameter 3 : agentDrv
    OS Type : 0
    Execute Shell Command - (Continue on Fail)
    Parameter 1 : mkdir #agentDrv#temp
    Parameter 2 : 1
    OS Type : 0
    Execute Shell Command
    Parameter 1 : copy "\\XXXXXXX\Software\Adobe Pro 9\Adobe Acrobat 9 Pro\Data1.cab" "#agentDrv#temp\Data1.cab"
    Parameter 2 : 1
    OS Type : 0
    Execute Shell Command
    Parameter 1 : copy "\\XXXXXXX\Software\Adobe Pro 9\Adobe Acrobat 9 Pro\AcroPro.msi" "#agentDrv#temp\AcroPro.msi"
    Parameter 2 : 1
    OS Type : 0
    Execute File
    Parameter 1 : %windir%\system32\msiexec.exe
    Parameter 2 : /i #agentDrv#temp\AcroPro.msi -qn PIDKEY=XXXXXXXXXXXXXXXXXXXXXXX
    Parameter 3 : 3
    OS Type : 0
    ELSE
    Execute Script
    Parameter 1 : Adobe pidkey test (NOTE: Script reference is NOT imported. Correct manually in script editor.
    Parameter 2 : 1
    Parameter 3 : 2
    OS Type : 0


    ...but that didn't work. I took a stab that the .msi would require the .cab to unpack and install.
    So I've pretty much taken a half educated guess at how to do this, it seems to be possible via transform files or something, but I can't find anything on these forums to support that. I'm sure I've missed something basic, or this is not possible at all, but I'd love it if someone could point me in the write direction.


    EDIT - I should probably mention that msiexec runs as a process for about 10 minutes, I don't know if it's hanging or actually working. Is there some diag tools I could use?

    Legacy Forum Name: Is what I'm trying to achieve possible? License key with Windows installer.,
    Legacy Posted By Username: Rukk
  • Since you see MSIEXEC running... have you tried running the command line by itself to see what happens? Are their dialog boxes that show up that would give you a clue?

    Legacy Forum Name: Scripts Forum,
    Legacy Posted By Username: dbennett
  • Executes in CMD shell without error, and msiexec.exe whirs away for about 10 minutes as before. It never uses any CPU, just sits at 8.8MB of RAM while it's running, I don't know if that's of any consequence or not.
    During a manual install the installer stopped when it found Pro 7 installed and asked me to remove it. I'll try removing Pro 7 and run the script again.
    Is there any way I can get more output/information from the msiexec.exe? What exactly does the -qn switch mean, does the q make it silent?

    Legacy Forum Name: Scripts Forum,
    Legacy Posted By Username: Rukk
  • If you take a look at msiexec you'll find this

    Windows ® Installer. V 4.5.6002.18005

    msiexec /Option [Optional Parameter]

    Install Options

    Installs or configures a product
    /a
    Administrative install - Installs a product on the network
    /j [/t ] [/g ]
    Advertises a product - m to all users, u to current user

    Uninstalls the product
    Display Options
    /quiet
    Quiet mode, no user interaction
    /passive
    Unattended mode - progress bar only
    /q[n|b|r|f]
    Sets user interface level
    n - No UI
    b - Basic UI
    r - Reduced UI
    f - Full UI (default)
    /help
    Help information
    Restart Options
    /norestart
    Do not restart after the installation is complete
    /promptrestart
    Prompts the user for restart if necessary
    /forcerestart
    Always restart the computer after installation
    Logging Options
    /l[i|w|e|a|r|u|c|m|o|p|v|x|+|!|*]
    i - Status messages
    w - Nonfatal warnings
    e - All error messages
    a - Start up of actions
    r - Action-specific records
    u - User requests
    c - Initial UI parameters
    m - Out-of-memory or fatal exit information
    o - Out-of-disk-space messages
    p - Terminal properties
    v - Verbose output
    x - Extra debugging information
    + - Append to existing log file
    ! - Flush each line to the log
    * - Log all information, except for v and x options
    /log
    Equivalent of /l*
    Update Options
    /update [;Update2.msp]
    Applies update(s)
    /uninstall [;Update2.msp] /package
    Remove update(s) for a product
    Repair Options
    /f[p|e|c|m|s|o|d|a|u|v]
    Repairs a product
    p - only if file is missing
    o - if file is missing or an older version is installed (default)
    e - if file is missing or an equal or older version is installed
    d - if file is missing or a different version is installed
    c - if file is missing or checksum does not match the calculated value
    a - forces all files to be reinstalled
    u - all required user-specific registry entries (default)
    m - all required computer-specific registry entries (default)
    s - all existing shortcuts (default)
    v - runs from source and recaches local package
    Setting Public Properties
    [PROPERTY=PropertyValue]

    Consult the Windows ® Installer SDK for additional documentation on the
    command line syntax.

    Copyright © Microsoft Corporation. All rights reserved.
    Portions of this software are based in part on the work of the Independent JPEG Group.


    which by the looks of things you already know... (I post it for those who don't)


    Below is a script that I use to deploy something or other... the names have been changed to protect blah blah blah etc etc etc Wink ... can't give away all our secrets can I Smile

    Please note step 2



    Script Name: Prog Delpoyment (Win32 Desktop)
    Script Description: This will install the Prog client on windows workstations.
    This is the BASE client.

    IF True
    THEN
    Write File
    Parameter 1 : #vAgentConfiguration.AgentTempDir#\Prog.msi
    Parameter 2 : VSASharedFiles\Prog\Prog.msi
    OS Type : 0
    Execute Shell Command
    Parameter 1 : msiexec /i #vAgentConfiguration.AgentTempDir#\Prog.msi /quiet /norestart /LIME #vAgentConfiguration.AgentTempDir#\Prog.log
    Parameter 2 : 0
    OS Type : 0
    Delete File
    Parameter 1 : #vAgentConfiguration.AgentTempDir#\Prog.msi
    OS Type : 0
    Get File
    Parameter 1 : #vAgentConfiguration.AgentTempDir#\Prog.log
    Parameter 2 : avamar.log
    Parameter 3 : 0
    OS Type : 0
    Delete File
    Parameter 1 : #vAgentConfiguration.AgentTempDir#\Prog.log
    OS Type : 0
    ELSE


    Legacy Forum Name: Scripts Forum,
    Legacy Posted By Username: thirteentwenty
  • Rukk
    Executes in CMD shell without error, and msiexec.exe whirs away for about 10 minutes as before. It never uses any CPU, just sits at 8.8MB of RAM while it's running, I don't know if that's of any consequence or not.
    During a manual install the installer stopped when it found Pro 7 installed and asked me to remove it. I'll try removing Pro 7 and run the script again.
    Is there any way I can get more output/information from the msiexec.exe? What exactly does the -qn switch mean, does the q make it silent?


    The -qn turns off the UI, as was indicated in the prior post. You are running this as SYSTEM. To debug, run it as the current user, and dump the -qn (the default is -qf. See what you see on the screen.

    My guess is the problem is you are NOT using the /quiet switch, which instructs MSIEXEC to run fully unattended with no user interaction.

    Let us know!

    Legacy Forum Name: Scripts Forum,
    Legacy Posted By Username: dbennett
  • Thanks for the posts, very informative.
    I ended up finding an old document that showed me how to create a network installation, patch the MSI, then using Adobe Customization Wizard I included things like serial key and suppressing EULA.
    Rolled it out with application deploy, along with some yes/no windows to have the users close Office, then a message telling them when it was done so they could open Outlook again.

    So simple, but I'm having a ball messing around with this stuff, I'll play around with msiexec some more over the weekend. Cheers.

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