Jump to content

How to not allow end users to uninstall Pulseway Manager


Zach
 Share

Recommended Posts

Good morning Pulseway team,

I came across an issue that was a big oversight and I'm looking to find out if there is a way to not allow an end user to uninstall the Pulseway Manager.

The story is I had an employee that was having issues with their computer. They assumed that it had to be the Pulseway Manager tool since he's convinced that ever since the tool has been installed he has had a much slower computer. The real reason was his in truck hotspot wasn't giving him the speeds as he was getting in the office... Long story short he uninstalled the Pulseway Manager tool which when he called asking me to "fix his computer" I couldn't because he didn't have the Manager tool installed. 

My question to all of you is have you ever had an instance where you had an app that you didn't want an end user to uninstall and they did? Is there a way to prevent this from happening or making it so they have to enter a password to uninstall it? I know I could make the user a standard user but that won't work for my instance since our employees need to be an admin to execute scripts (such as changing their IP address to access a modem or such). 

Thank you,

Link to comment
Share on other sites

There are a couple of things you can do here. 

1.  Don't give regular users Admin rights on a machine.  Of course this may not be a viable option for many businesses/end users. 

2. Delete the reg key associated with the program displaying in Add/Remove Programs.  

3. This is my preferred method of choice: Add a new reg key called "SystemComponent" with a dword value of 1 to HKLK:\Software\Microsoft\Windows\CurrentVersion\Uninstall\{3AB4D18D-98B3-41EF-94EA-DA587F282BB1} (or whatever key your Pulseway is in for that last part).  This will hide it from Add/Remove Programs.  So unless the user is more advanced or really determined to find it and remove it, this should stop most normal end users.  Value of 0 makes it appear again.  Very easy to just deploy via script to all machines Pulseway is on. 

 

I do think that Pulseway should provide an option to password protect the uninstall, but this was brought up years ago and hasn't been provided, so I don't think they plan on it any time soon. 

Link to comment
Share on other sites

  • 2 weeks later...
On 8/19/2021 at 3:11 PM, Mark G38 said:

key your Pulseway is in

@Mark G38I noticed when looking for my registry key it's different between machines. Is there a way to have a blanket statement when hiding the uninstaller? 

Edited by Zach
Link to comment
Share on other sites

On 8/30/2021 at 12:34 PM, Zach said:

@Mark G38I noticed when looking for my registry key it's different between machines. Is there a way to have a blanket statement when hiding the uninstaller? 

Edited because I'm silly and posted my old version.  Please see the updated and correct one below.  

Edited by Mark G38
Link to comment
Share on other sites

Apologies.  Don't use the one above.  It DOES work, however, I realized I posted my original version which I realized not long after creating it that if you run it against a machine that already had it ran before, depending on what it's set to, it won't adjust it correctly.  Please use this instead.  I've actually modified this one to look at both x86 and x64 registry paths, as well as being able to enter multiple apps you may want to hide from your users.  I've left mine in as examples.  This will loop through both registry paths, and if the app exists there, will check for SystemComponent and add or modify as necessary.  Let me know if you have any trouble with it. 

$ErrorActionPreference = "SilentlyContinue"
$RegPaths = @(
    "HKLM:\Software\Microsoft\Windows\CurrentVersion\Uninstall\*",
    "HKLM:\Software\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\*"
)
 
$AppsToHide = @(
    "Pulseway",
    "Splashtop Streamer",
    "Splashtop Software Updater"
)
 
foreach ($App in $AppsToHide) {
    foreach ($Path in $RegPaths) {
        $AppKey = (Get-ItemProperty $Path | Where-Object { $_.DisplayName -eq $($App) }).PSPath
        if ($null -ne $AppKey) {
            $SystemComponent = Get-ItemProperty $AppKey -Name SystemComponent
            if (!($SystemComponent)) {
                Write-Output "$($App) SystemComponent key not found. Adding..."
                New-ItemProperty "$AppKey" -Name "SystemComponent" -Value 1 -PropertyType DWord
            }
            else {
                $SystemComponentValue = (Get-ItemProperty $AppKey -Name SystemComponent).SystemComponent
 
                if ($SystemComponentValue -eq 0) {
                    Write-Output "$($App) key value currently 0. Setting value to 1."
                    Set-ItemProperty "$AppKey" -Name "SystemComponent" -Value 1
                }
 
                if ($SystemComponentValue -eq 1) {
                    Write-Output "$($App) key value already set to 1."
                }
            }
        }
        else {
            Write-Output "$($App) not found in $($Path)"
        }    
    }
}
Edited by Mark G38
Link to comment
Share on other sites

10 hours ago, Mark G38 said:

Apologies.  Don't use the one above.  It DOES work, however, I realized I posted my original version which I realized not long after creating it that if you run it against a machine that already had it ran before, depending on what it's set to, it won't adjust it correctly.  Please use this instead.  I've actually modified this one to look at both x86 and x64 registry paths, as well as being able to enter multiple apps you may want to hide from your users.  I've left mine in as examples.  This will loop through both registry paths, and if the app exists there, will check for SystemComponent and add or modify as necessary.  Let me know if you have any trouble with it. 

You're the best! Thank you for all your help!

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...