Skip to content

Commit

Permalink
Add URL to CheckForUpdates function when out of date
Browse files Browse the repository at this point in the history
  • Loading branch information
asheroto committed Jun 20, 2023
1 parent 173266c commit f8accfa
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
UPDATE-NOTES
UPDATE-NOTES
dist/
10 changes: 7 additions & 3 deletions UninstallTeams.ps1
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<#PSScriptInfo
.VERSION 1.0.0
.VERSION 1.0.1
.GUID 75abbb52-e359-4945-81f6-3fdb711239a9
.AUTHOR asherto
.COMPANYNAME asheroto
Expand All @@ -15,6 +15,7 @@
[Version 0.0.7] - Added removal AppxPackage.
[Version 0.0.8] - Added removal of startup entries.
[Version 1.0.0] - Added ability to optionally disable Chat widget (Win+C) which will reinstall Teams. Major refactor of code.
[Version 1.0.1] - Added URL to -CheckForUpdates function when script is out of date.
#>

<#
Expand All @@ -26,6 +27,8 @@ Uninstalls Microsoft Teams and removes the Teams directory for a user.
The script stops the Teams process, uninstalls Teams from the AppData directory, removes the Teams AppxPackage, deletes the Teams directory, uninstalls Teams from the Uninstall registry key, and removes Teams from the startup registry key.
You can also optionally disable the Chat widget (Win+C) for Microsoft Teams.
.PARAMETER DisableChatWidget
Disables the Chat widget (Win+C) for Microsoft Teams.
Expand Down Expand Up @@ -63,7 +66,7 @@ UninstallTeams.ps1 -UnsetChatWidget -AllUsers
Removes the Chat widget key, effectively enabling it since that is the default, for all user profiles on the machine.
.NOTES
Version : 1.0.0
Version : 1.0.1
Created by : asheroto
.LINK
Expand All @@ -84,7 +87,7 @@ param (
)

# Version
$CurrentVersion = '1.0.0'
$CurrentVersion = '1.0.1'

# Check if -Version is specified
if ($Version.IsPresent) {
Expand Down Expand Up @@ -200,6 +203,7 @@ if ($CheckForUpdates) {

if ($LatestVersion -gt $CurrentVersion) {
Write-Output "A new version of UninstallTeams is available. Current version: $CurrentVersion. Latest version: $LatestVersion. Published at: $PublishedAt."
Write-Output "You can download the latest version from https://github.com/asheroto/UninstallTeams/releases."
} else {
Write-Output "UninstallTeams is up to date. Current version: $CurrentVersion. Latest version: $LatestVersion. Published at: $PublishedAt."
}
Expand Down

0 comments on commit f8accfa

Please sign in to comment.