Remove the previous Windows app
Use this article if PCs still have the previous Mobile Locker Windows app (version 2.x). Remove that app before you deploy the current Windows app (version 5.x).
The two apps are different products. They can both appear as Mobile Locker in Settings. They can both register the same mobilelocker:// links. Leave version 2 installed and users will open the wrong app.
For the current app, see Deploy the Windows app with Intune.
Do this first. Uninstall version 2, delete its data folder, then install version 5. Do not rely on publisher name to tell the apps apart. Both are signed as Vorenus Ventures LLC. Use the version number.
On this page
Tell the apps apart
Open Settings > Apps > Installed apps and find Mobile Locker. Read the version.
| App | Version | Typical location |
|---|---|---|
| Previous Windows app | 2.x | %LocalAppData%\Programs\Mobile Locker\ |
| Current Windows app | 5.x | %LocalAppData%\MobileLocker\current\MobileLocker.exe |
If IT installed version 2 with elevation, the uninstaller can also sit under %ProgramFiles%\Mobile Locker\.
Do not uninstall version 5. Do not delete %LocalAppData%\MobileLocker\. That folder belongs to the current app.
Remove it on one PC
- Close Mobile Locker if it is open (use Task Manager if it stays in the tray).
- Open Settings > Apps > Installed apps.
- Select Mobile Locker whose version starts with 2.
- Click Uninstall and finish the wizard.
- Delete the data folder in the next section. The wizard does not remove it.
Delete the data folder
Version 2 stored presentations, its local database, cache, and logs here:
%USERPROFILE%\Downloads\mobilelocker\
If the user’s Downloads folder is redirected (for example to OneDrive), the same mobilelocker folder is under that redirected Downloads path.
That folder is leftover app data. It is not the rest of the user’s Downloads files. Delete the mobilelocker folder only.
The current app (version 5) does not use this path. After sign-in, it downloads presentations again into its own folder.
Always delete it after you uninstall version 2. Uninstall is not complete while Downloads\mobilelocker is still on the disk.
Scripted uninstall
Save this as Remove-PreviousMobileLocker.ps1. Use the same file for one user and for a fleet.
- Run as the logged-on user to clean that profile.
- Run as SYSTEM (Intune or ConfigMgr) to uninstall every profile and a machine-wide copy, if one exists.
The script finds version 2 by its install folder (Programs\Mobile Locker), not by publisher. It runs the uninstaller with /S. It then deletes each user’s Downloads\mobilelocker folder, including a redirected OneDrive Downloads copy. It does not touch %LocalAppData%\MobileLocker (version 5).
$ErrorActionPreference = 'Continue'
function Test-IsSystem {
return [Security.Principal.WindowsIdentity]::GetCurrent().User.Value -eq 'S-1-5-18'
}
function Test-IsPreviousUninstaller([string]$Exe) {
if ([string]::IsNullOrWhiteSpace($Exe)) { return $false }
if (-not (Test-Path -LiteralPath $Exe)) { return $false }
$full = [IO.Path]::GetFullPath($Exe)
if ($full -match '(?i)\\MobileLocker\\') { return $false }
return $full -match '(?i)\\Mobile Locker\\Uninstall Mobile Locker\.exe$'
}
function Stop-PreviousApp {
Get-Process -Name 'Mobile Locker' -ErrorAction SilentlyContinue | ForEach-Object {
Stop-Process -Id $_.Id -Force -ErrorAction SilentlyContinue
try { $_.WaitForExit(10000) | Out-Null } catch { }
}
}
function Invoke-PreviousUninstaller([string]$Exe, [string[]]$ExtraArgs = @()) {
if (-not (Test-IsPreviousUninstaller $Exe)) { return }
$argList = @('/S') + @($ExtraArgs)
Write-Host "Running $Exe $($argList -join ' ')"
$p = Start-Process -FilePath $Exe -ArgumentList $argList -Wait -PassThru -WindowStyle Hidden
if ($null -ne $p -and $p.ExitCode -ne 0) {
Write-Host "Uninstaller exit code $($p.ExitCode) for $Exe"
}
}
function Remove-PreviousDataFolder([string]$Folder) {
if ([string]::IsNullOrWhiteSpace($Folder)) { return }
if (-not (Test-Path -LiteralPath $Folder)) { return }
$name = [IO.Path]::GetFileName($Folder)
if ($name -ne 'mobilelocker') { return }
Write-Host "Deleting $Folder"
Remove-Item -LiteralPath $Folder -Recurse -Force -ErrorAction Continue
}
function Get-ProfileDataFolders([string]$UserProfile) {
$folders = @(Join-Path $UserProfile 'Downloads\mobilelocker')
$oneDrive = @(
Get-ChildItem -Path (Join-Path $UserProfile 'OneDrive*\Downloads\mobilelocker') -Directory -ErrorAction SilentlyContinue |
ForEach-Object { $_.FullName }
)
if ($oneDrive.Count -gt 0) { $folders += $oneDrive }
return $folders
}
function Uninstall-PreviousForProfile([string]$UserProfile) {
$exe = Join-Path $UserProfile 'AppData\Local\Programs\Mobile Locker\Uninstall Mobile Locker.exe'
Invoke-PreviousUninstaller -Exe $exe
foreach ($folder in Get-ProfileDataFolders $UserProfile) {
Remove-PreviousDataFolder $folder
}
}
function Invoke-RegistryVersion2Uninstallers {
$roots = @(
'HKCU:\Software\Microsoft\Windows\CurrentVersion\Uninstall',
'HKLM:\Software\Microsoft\Windows\CurrentVersion\Uninstall',
'HKLM:\Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall'
)
foreach ($root in $roots) {
if (-not (Test-Path $root)) { continue }
Get-ChildItem $root -ErrorAction SilentlyContinue | ForEach-Object {
$p = Get-ItemProperty $_.PSPath -ErrorAction SilentlyContinue
if ($null -eq $p) { return }
if ($p.DisplayName -notlike 'Mobile Locker*') { return }
if ($p.DisplayVersion -notmatch '^2(\.|$)') { return }
$command = $p.QuietUninstallString
if ([string]::IsNullOrWhiteSpace($command)) { $command = $p.UninstallString }
if ([string]::IsNullOrWhiteSpace($command)) { return }
$exe = $null
if ($command -match '^"([^"]+)"') { $exe = $Matches[1] }
elseif ($command -match '^(\S+)') { $exe = $Matches[1] }
if ($exe -match '(?i)msiexec') { return }
Invoke-PreviousUninstaller -Exe $exe
}
}
}
Stop-PreviousApp
if (Test-IsSystem) {
Write-Host 'Running as SYSTEM: cleaning every profile.'
$skip = @('Public', 'Default', 'Default User', 'All Users')
Get-ChildItem -Path 'C:\Users' -Directory -ErrorAction SilentlyContinue | Where-Object {
$skip -notcontains $_.Name
} | ForEach-Object {
Write-Host "Profile $($_.Name)"
Uninstall-PreviousForProfile $_.FullName
}
Invoke-PreviousUninstaller -Exe (Join-Path $env:ProgramFiles 'Mobile Locker\Uninstall Mobile Locker.exe') -ExtraArgs @('/allusers')
} else {
Write-Host 'Running as the logged-on user.'
Uninstall-PreviousForProfile $env:USERPROFILE
try {
$downloads = (New-Object -ComObject Shell.Application).NameSpace('shell:Downloads').Self.Path
if ($downloads) {
Remove-PreviousDataFolder (Join-Path $downloads 'mobilelocker')
}
} catch { }
}
Invoke-RegistryVersion2Uninstallers
Write-Host 'Done.'
Run it:
powershell.exe -NoProfile -ExecutionPolicy Bypass -File Remove-PreviousMobileLocker.ps1
Use the script in Intune
Prefer a remediation (detect, then remediate). You can also wrap the same script as a Win32 app.
Remediation
Detection for user context (exit 1 when version 2 is still present or the data folder is still there; exit 0 when the PC is clean):
$ErrorActionPreference = 'Continue'
$found = $false
$uninstaller = Join-Path $env:LOCALAPPDATA 'Programs\Mobile Locker\Uninstall Mobile Locker.exe'
if (Test-Path -LiteralPath $uninstaller) { $found = $true }
$downloads = Join-Path $env:USERPROFILE 'Downloads\mobilelocker'
try {
$known = (New-Object -ComObject Shell.Application).NameSpace('shell:Downloads').Self.Path
if ($known) { $downloads = Join-Path $known 'mobilelocker' }
} catch { }
if (Test-Path -LiteralPath $downloads) { $found = $true }
$roots = @(
'HKCU:\Software\Microsoft\Windows\CurrentVersion\Uninstall',
'HKLM:\Software\Microsoft\Windows\CurrentVersion\Uninstall',
'HKLM:\Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall'
)
foreach ($root in $roots) {
if (-not (Test-Path $root)) { continue }
Get-ChildItem $root -ErrorAction SilentlyContinue | ForEach-Object {
$p = Get-ItemProperty $_.PSPath -ErrorAction SilentlyContinue
if ($p.DisplayName -like 'Mobile Locker*' -and $p.DisplayVersion -match '^2(\.|$)') {
$found = $true
}
}
}
if ($found) { exit 1 } else { exit 0 }
Remediation: run Remove-PreviousMobileLocker.ps1. Assign the remediation in user context so HKCU and the user Downloads folder are in scope.
If you must run as SYSTEM, use the same remediation script, and change detection to look under C:\Users\*\AppData\Local\Programs\Mobile Locker\Uninstall Mobile Locker.exe and each profile’s Downloads\mobilelocker folder.
Win32 app
| Field | Value |
|---|---|
| Install behavior | User for one profile, or System to clean every profile |
| Install command | powershell.exe -NoProfile -ExecutionPolicy Bypass -File Remove-PreviousMobileLocker.ps1 |
| Detection | Custom script: treat the Win32 app as installed when no Mobile Locker 2.x remains and the data folder is gone |
| Assignments | Required on the group that still has version 2 |
Assign this package and confirm it reports success on a pilot PC before you assign the current Windows app as Required. See Deploy the Windows app with Intune.
After you remove it
- Settings > Apps should not list Mobile Locker version 2.
Downloads\mobilelockershould be gone.%LocalAppData%\MobileLocker\should still exist if you already installed version 5.- Then deploy the current Setup from the Intune article.
If sign-in fails after you install version 5, see IT Considerations for the Windows App and Amazon SSL certificate trust (Windows).