Guest User

TikTokDetection

a guest
Sep 17th, 2025
24
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.05 KB | None | 0 0
  1.  
  2.  
  3. $AppName = "TikTok" # DisplayName in Add/Remove Programs
  4.  
  5.  
  6.  
  7. # Gather all the apps in the Add/Remove Programs Registry Keys
  8. $Apps = (Get-ChildItem HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\) | Get-ItemProperty | Select-Object DisplayName, DisplayVersion, WindowsInstaller, SystemComponent
  9. $Apps += (Get-ChildItem HKLM:\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\) | Get-ItemProperty | Select-Object DisplayName, DisplayVersion, WindowsInstaller, SystemComponent
  10.  
  11. # Check is the App DisplayName is found
  12.  
  13. $AppFound = $Apps | Where-Object {
  14. ($_.DisplayName -match $AppName)
  15. }
  16.  
  17. # Post some output if the app is found
  18. if ($AppFound) {
  19. $TikTok = "Detected"
  20. } else {
  21. $TikTok = " NotDetected"
  22. }
  23.  
  24. # Check the AppxPackages for the App
  25.  
  26. $AppFound = Get-AppxPackage -AllUsers | Where-Object {$_.Name -like "BytedancePte.Ltd.TikTok" } | Select-Object Name
  27. if ($AppFound) {
  28. $TikTok = "Detected"
  29. } else {
  30. $TikTok = " NotDetected"
  31. }
  32.  
  33.  
  34. $hash = @{ TikTok = $TikTok}
  35. return $hash | Convertto-Json -Compress
Advertisement
Add Comment
Please, Sign In to add comment