Solved

Not able to install software at endpoint

  • 8 December 2023
  • 2 replies
  • 125 views

Badge

Hi Everyone, we just recently switched from PDQ to Automox and im new to this platform, and im migrating our baseline applications to Automox.. im using required software policy to install it on endpoint devices.. simples stuff attaching msi or exe and writing installation command in there but the thing it comes out at installed software in Automox policy activity log but its not actually installed at endpoint.. im pasting command here that im using.. let me know if im doing something wrong here.. 

 

$exitCode = (Start-Process -FilePath 'msiexec.exe' -ArgumentList '/qn', '/i', '"CitrixWorkspaceApp.exe"', '/norestart' -Wait -PassThru).ExitCode exit $exitCode

 

 

then i tried this one to see if can get log file to see whats wrong but it giving same thing and dont see a log folder on device..

 

$logPath = "C:\AutomoxLogs\CitrixWorkspaceAppInstallLog.txt"

try {
    $exitCode = (Start-Process -FilePath 'msiexec.exe' -ArgumentList '/qn', '/i', '"CitrixWorkspaceApp.exe"', '/norestart' -Wait -PassThru -RedirectStandardError $logPath).ExitCode

    if ($exitCode -eq 0) {
        Write-Host "Installation completed successfully."
    } else {
        Write-Host "Installation failed with exit code: $exitCode"
    }

} catch {
    Write-Host "An error occurred during installation: $_"
}

 

Thanks..

icon

Best answer by JohnG-Automox 11 December 2023, 16:20

View original

2 replies

Userlevel 3

Hi @Maulik_Busa !

I noticed that you are calling msiexec.exe in your Required Software Policy, but the installation media is an exe file.

For example:
Start-Process -FilePath 'msiexec.exe' -ArgumentList '/qn', '/i', '"CitrixWorkspaceApp.exe"'

That said, the invocation of the exe and the install switches you’ve passed to it would not work.

According to Citrix’s documentation, the available command line arguments for a silent install via exe are /silent, /noreboot, and /forceinstall
Sourcehttps://docs.citrix.com/en-us/citrix-workspace-app-for-windows/install#common-parameters

For more advanced software deployments where multiple install arguments and logging are needed such as this, I recommend pivoting from a Required Software Policy to using a Worklet.

Within our Worklet Catalog we have a boiler plate worklet you can use for Custom EXE installs:
EXE Software Installation (System Wide-All Users)

With this worklet, you will need to upload the CitrixWorkspaceApp.exe to the payload of the worklet.


You will then want to update the Evaluation Code to include your application requirements:

Evaluation Code



The Remediation Code should also be updated to include the DisplayName, target version, payload name, and the arguments you’d like to pass during installation. Note, the $fileName variable should be an exact match of the payload that you upload to the worklet.
 

Remediation Code


When configuring a worklet you have the option to associate a schedule.  With a schedule associated, when an Automox scan occurs on the device it will run the Evaluation Code to determine if the device is compliant with the policy. In this case, if the Citrix Workspace app is installed, the device is compliant and the worklet will Exit 0, thus ending the policy run.

If the device is deemed “not-compliant” in that it does not have the Citrix Workspace App, the worklet will Exit 1 and trigger the remediation code to run based on the next scheduled time defined within the policy.

If you wish to perform an immediately policy action to install the software, you can either run the policy manually from the device page or through the worklet itself. Note, the latter option will run the worklet against all online devices within the group the worklet is associated to:

 

Running the policy manually on one device


 

Running the worklet against all devices within the associated group



With the worklet configured as you see above, when the policy Remediation action completes, you will see a report within your Automox Activity Log indicating whether or not the worklet run was successful:

 


 


I hope this helps!

Have a great day!​​​​​​​

Badge

Thanks a lot John, It worked and gonna use that for other exe as well 😃

Reply