Tuesday, March 11, 2025

How to fix clients overwriting other clients in Action 1

Action 1 is a great patch management system.  However one thing you should not do is add the action 1 client when imaging, the client should always be added on after or you will need to run a script to clear a registry entry.

The issue looks like this


The client that was imaged shows up but then when the action 1 client is imaged and deployed it doesn't change a registry entry so when you have systems with the action 1 client imaged and deployed the clients over write each other in the action 1 web interface.



Uninstalling and reinstalling the action 1 client will not fix the issue however clearing the registry value should, and should not require re-installing the client.

On the affected system(s) check the registry 

HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Action1

The 'agent guid' should be unique, if not stop the service and clear the registry value; then restart the service.

You can also get the information for this fix form Action1

https://www.action1.com/documentation/distribution-with-pc-images

1) Install Action1 agent on the computer that will be the image
2) Open Start > Services > Stop 'Action1 Agent' service
3) Open Start > Regedit > Clear 'agent.guid' value

HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Action1



Thursday, February 20, 2025

Using Powershell in Action1 to update RustDesk

Using Powershell in Action1 to update RustDesk

This script can be used to install and update RustDesk using Action1.  Action1 is a wonderful cloud based patch management system, though I can create an on prem solution for deploying RustDesk, it was decided that we needed to be able to deploy updates for the software to users at home as well for remote support options as RustDesk is more responsive and faster than Action1.  This can be run as a custom script created and saved in the script library in action1 


or it can be run directly on the endpoint if it is a script you don't need to run over again which can be found near the actions column in action 1.



Below is the powershell script for updating/installing RustDesk.  If you have your own rustdesk server this WILL keep your settings when updating.

##START COPY

$Folder = 'c:\itTemp'

$URL = 'https://github.com/rustdesk/rustdesk/releases/download/1.3.7/rustdesk-1.3.7-x86_64.msi'

##"Test to see if folder [$Folder]  exists"

if (Test-Path -Path $Folder) {

##If it exsists remove it

Remove-Item 'c:\itTemp' -Force

##Is RustDesk Installed?  If it is uninstall it.

Get-CimInstance -ClassName win32_product | Where-Object Name -Match "RustDesk" | 

    ForEach-Object -Process { 

        Invoke-CimMethod -InputObject $_ -Name Uninstall 

                            }

##Create a temporary folder, download the latest version of RustDesk and install it

New-Item -Path "c:\" -Name "itTemp" -ItemType "directory"

Invoke-WebRequest https://github.com/rustdesk/rustdesk/releases/download/1.3.7/rustdesk-1.3.7-x86_64.msi -OutFile c:\itTemp\rustdesk-1.3.7-x86_64.msi

$pkg = "c:\itTemp\rustdesk-1.3.7-x86_64.msi";

Start-Process msiexec "/i $pkg /norestart /qn" -Wait;

##Wait 30 seconds before removing the directory

Start-Sleep -Seconds 30

##Clean up garbage

Remove-Item -Recurse -Force c:\itTemp\*.*

Remove-Item 'c:\itTemp' -Force

} else {

##If the itTemp folder doesn't exsits remove rustdesk 

Get-CimInstance -ClassName win32_product | Where-Object Name -Match "RustDesk" | 

    ForEach-Object -Process { 

        Invoke-CimMethod -InputObject $_ -Name Uninstall 

                            }

##Create a temporary folder, download the latest version of RustDesk and install it                            

New-Item -Path "c:\" -Name "itTemp" -ItemType "directory"

Invoke-WebRequest https://github.com/rustdesk/rustdesk/releases/download/1.3.7/rustdesk-1.3.7-x86_64.msi -OutFile c:\itTemp\rustdesk-1.3.7-x86_64.msi

$pkg = "c:\itTemp\rustdesk-1.3.7-x86_64.msi";

Start-Process msiexec "/i $pkg /norestart /qn" -Wait;

##Wait 30 seconds before removing the directory

Start-Sleep -Seconds 30

##Clean up garbage

Remove-Item -Recurse -Force c:\itTemp\*.*

Remove-Item 'c:\itTemp'

}

##END COPY

How to fix clients overwriting other clients in Action 1

Action 1 is a great patch management system.  However one thing you should not do is add the action 1 client when imaging, the client should...